{注意异或的 运算法则} var n,k,i,j,ans:longint; a:array[1..5000] of longint; s:array[0..5000] of longint; begin read(n,k); fillchar(s,sizeof(s),0); ans:=0; for i:=1 to n do begin read(a[i]); s[i]:=s[i-1] xor a[i]; end; for i:=1 to n do begin if a[i]=k then inc(ans); for j:=i+1 to n do if s[i-1] xor s[j] =k then inc(ans); end; writeln(ans); end.