{"raw_statement":[{"iden":"problem statement","content":"You are given $N$ non-negative integers $A_1, A_2, ..., A_N$ and another non-negative integer $K$.\nFor a integer $X$ between $0$ and $K$ (inclusive), let $f(X) = (X$ XOR $A_1)$ $+$ $(X$ XOR $A_2)$ $+$ $...$ $+$ $(X$ XOR $A_N)$.\nHere, for non-negative integers $a$ and $b$, $a$ XOR $b$ denotes the bitwise exclusive OR of $a$ and $b$.\nFind the maximum value of $f$.\n\nWhat is XOR?\n\nThe bitwise exclusive OR of $a$ and $b$, $X$, is defined as follows:\n\n*   When $X$ is written in base two, the digit in the $2^k$'s place ($k \\geq 0$) is $1$ if, when written in base two, exactly one of $A$ and $B$ has $1$ in the $2^k$'s place, and $0$ otherwise.\n\nFor example, $3$ XOR $5 = 6$. (When written in base two: $011$ XOR $101 = 110$.)"},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq N \\leq 10^5$\n*   $0 \\leq K \\leq 10^{12}$\n*   $0 \\leq A_i \\leq 10^{12}$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$\n$A_1$ $A_2$ $...$ $A_N$"},{"iden":"sample input 1","content":"3 7\n1 6 3"},{"iden":"sample output 1","content":"14\n\nThe maximum value is: $f(4) = (4$ XOR $1) + (4$ XOR $6) + (4$ XOR $3) = 5 + 2 + 7 = 14$."},{"iden":"sample input 2","content":"4 9\n7 4 0 3"},{"iden":"sample output 2","content":"46"},{"iden":"sample input 3","content":"1 0\n1000000000000"},{"iden":"sample output 3","content":"1000000000000"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}