#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x>N; T[0]=1; FOR(i,N) { cin>>A[i]; FOR(x,1<<15) if(T[x]) T[x ^ A[i]]=1; } cout<