#D8696. Xor Array
Xor Array
Xor Array
Problem statement
Given the integers and . Find the remainder by dividing the number of sequences of length that satisfy the following conditions by .
- The sequence is a monotonous increase in a broad sense.
- Each element of the sequence is greater than or equal to and less than or equal to .
- The exclusive OR (xor) of all elements is .
Constraint
- and are integers.
input
Input is given from standard input in the following format.
output
Output the answer.
Input example 1
twenty three
Output example 1
2
The sequences and satisfy the condition.
Input example 2
1 1
Output example 2
1
Only the sequence meets the condition.
Input example 3
224 239
Output example 3
400351036
Example
Input
2 3
Output
2
inputFormat
input
Input is given from standard input in the following format.
outputFormat
output
Output the answer.
Input example 1
twenty three
Output example 1
2
The sequences and satisfy the condition.
Input example 2
1 1
Output example 2
1
Only the sequence meets the condition.
Input example 3
224 239
Output example 3
400351036
Example
Input
2 3
Output
2
样例
2 3
2