#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a g(n); signed uku(){ //cout<<0; for(Int i=1;i s; if(i==1) s.emplace(g[0]); else s.emplace(g[i-2]); for(Int j=0;j+3<=i;j++) s.emplace(g[j]^g[i-(j+3)]); while(s.count(g[i])) g[i]++; //cout<>n; vector a(n); for(Int i=0;i>a[i]; sort(a.begin(),a.end()); Int ans=0; for(Int i=0;i