#include using namespace std; int g[500001]; int n; vector a; int ans; int main() { g[0]=0; g[1]=1; g[2]=1; for(int i=3; i<130; ++i) { priority_queue,greater> que; que.emplace(g[i-2]); for(int j=0; j*2<=i-3; ++j) { que.emplace(g[j]^g[i-3-j]); } while(!que.empty()) { int t=que.top(); que.pop(); if(t>g[i]) break; if(t==g[i]) g[i]++; } } for(int i=130; i<500001; ++i) { g[i]=g[i-68]; } cin>>n; a.resize(n); for(int i=0; i>a[i]; sort(begin(a),end(a)); for(int i=0; i