407399: GYM102784 F Xorro the Xorman
Description
Erik forgot to make a costume for this year's Halloween festivities, which means he has to reuse his old Zorro outfit from last year. However, he doesn't want to be ridiculed by his friends for his laziness, so Erik rebrands himself as Xorro the Xorman. Instead of slashing a 'Z' on his enemies defeated in sword combat, Xorro will carve an 'X' onto whomever cannot answer his question involving the XOR bitwise operator. You meet the infamous Xorman while trick or treating, and are given two integers $$$A$$$ and $$$B$$$. Xorro wants you to tell him the maximum possible XOR of $$$A$$$ and $$$b$$$ for some integer $$$0 \leq b \leq B$$$. If you fail to answer correctly, Erik will strike in retaliation. Can you avoid the wrath of Xorro?
InputThe first and only line of input contains two integers $$$A$$$ and $$$B$$$ such that $$$0 \leq A, B \leq 10^{18}$$$.
OutputOutput a single integer representing the answer to Xorro's query, the maximum possible value of $$$A \oplus b$$$.
ExamplesInput5 4Output
7Input
7 32Output
39