#arc116d. [arc116_d]I Wanna Win The Game
[arc116_d]I Wanna Win The Game
Problem Statement
Given are integers and . How many sequences of integers satisfy the following conditions?
- xor xor xor ("xor" denotes the bitwise XOR.)
Since the answer can be enormous, report it modulo .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
5 20
Sample Output 1
475
Some of the sequences satisfying the conditions follow:
Sample Input 2
10 5
Sample Output 2
0
Sample Input 3
3141 2718
Sample Output 3
371899128