Choose between 1 and k distinct integers from [l, r] minimizing the XOR of the chosen set, and output that minimum XOR.
Seonggwan wants to build a set SSS that satisfies all of the following conditions.
Choose SSS so that the bitwise XOR of all its elements is as small as possible, and find that XOR value.
The first line contains the natural numbers lll, rrr, kkk, separated by spaces. (1≤l≤r≤10121 \le l \le r \le 10^{12}1≤l≤r≤1012, 1≤k≤min(106,r−l+1)1 \le k \le \min(10^6, r-l+1)1≤k≤min(106,r−l+1))
Print the smallest XOR value on the first line. Several sets can reach that smallest value, but the output is that single value.