{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":" \n \u003cp\u003eGiven a sequence \u003cvar\u003ea\u003c/var\u003e[1..\u003cvar\u003en\u003c/var\u003e], you need to calculate how many integers \u003cvar\u003eS\u003c/var\u003e satisfy the following conditions:\u003c/p\u003e \n \u003cp\u003e(1). 0 ≤ \u003cvar\u003eS\u003c/var\u003e \u0026lt; 2\u003csup\u003e60\u003c/sup\u003e\u003c/p\u003e \n \u003cp\u003e(2). For every \u003cvar\u003ei\u003c/var\u003e in [1,\u003cvar\u003en\u003c/var\u003e-1] , (\u003cvar\u003ea\u003c/var\u003e[\u003cvar\u003ei\u003c/var\u003e] xor \u003cvar\u003eS\u003c/var\u003e) ≤ (\u003cvar\u003ea\u003c/var\u003e[\u003cvar\u003ei\u003c/var\u003e+1] xor \u003cvar\u003eS\u003c/var\u003e)\u003c/p\u003e \n "}},{"title":"Input","value":{"format":"HTML","content":" \n \u003cp\u003eOn the first line there is only one integer \u003cvar\u003en\u003c/var\u003e\u003c/p\u003e \n \u003cp\u003eOn the second line there are n integers \u003cvar\u003ea\u003c/var\u003e[1..\u003cvar\u003en\u003c/var\u003e] \u003c/p\u003e \n \u003cp\u003e1 ≤ \u003cvar\u003en\u003c/var\u003e ≤ 50\u003c/p\u003e \n \u003cp\u003e0 ≤ \u003cvar\u003ea\u003c/var\u003e[\u003cvar\u003ei\u003c/var\u003e] \u0026lt; 2\u003csup\u003e60\u003c/sup\u003e\u003c/p\u003e \n "}},{"title":"Output","value":{"format":"HTML","content":" \n \u003cp\u003eOutput one integer : the answer\u003c/p\u003e \n \u003c/div\u003e \n "}},{"title":"Sample Input","value":{"format":"HTML","content":" \n \u003cpre\u003e3\r\n1 2 3\u003c/pre\u003e \n "}},{"title":"Sample Output","value":{"format":"HTML","content":" \n \u003cpre\u003e288230376151711744\u003c/pre\u003e \n "}}]}