{"raw_statement":[{"iden":"statement","content":"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 <= b <= B$. If you fail to answer correctly, Erik will strike in retaliation. Can you avoid the wrath of Xorro?\n\nThe first and only line of input contains two integers $A$ and $B$ such that $0 <= A, B <= 10^(18)$.\n\nOutput a single integer representing the answer to Xorro's query, the maximum possible value of $A plus.circle b$.\n\n"},{"iden":"input","content":"The first and only line of input contains two integers $A$ and $B$ such that $0 <= A, B <= 10^(18)$."},{"iden":"output","content":"Output a single integer representing the answer to Xorro's query, the maximum possible value of $A plus.circle b$."},{"iden":"examples","content":"Input5 4\nOutput7\nInput7 32\nOutput39\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ A, B \\in \\mathbb{Z} $ with $ 0 \\le A, B \\le 10^{18} $.  \n\n**Constraints**  \n$ 0 \\le B $, and we seek $ b \\in \\mathbb{Z} $ such that $ 0 \\le b \\le B $.  \n\n**Objective**  \nMaximize the XOR value:  \n$$\n\\max_{\\substack{b \\in \\mathbb{Z} \\\\ 0 \\le b \\le B}} (A \\oplus b)\n$$","simple_statement":"Given two integers A and B, find the maximum value of A XOR b, where b is any integer such that 0 ≤ b ≤ B.","has_page_source":false}