You are given two integers N and K.
Calculate the value of the following mathematical expression:
N ⊕ (N + 1) ⊕ (N + 2) ⊕ ... ⊕ K
where ⊕ represents the bitwise XOR operation.
Since N and K can be very large, an efficient solution is required.
Input Format
The first line contains two integers:
N K
Output Format
Print the XOR of all integers from N to K, inclusive.
Constraints
1 ≤ N ≤ K ≤ 10^18
Example
Input: 3 7
Output: 3
Explanation:
3 ⊕ 4 ⊕ 5 ⊕ 6 ⊕ 7 = 3
Titan • Pending
Titan • Pending
Expedia • Pending
Expedia • Pending
Salesforce • Pending