#include #define syosu(x) fixed< P; typedef pair pdd; typedef pair pll; typedef vector vi; typedef vector vvi; typedef vector vd; typedef vector vvd; typedef vector vl; typedef vector vvl; typedef vector vs; typedef vector

vp; typedef vector vvp; typedef vector vpll; typedef pair pip; typedef vector vip; const int inf=1<<30; const ll INF=1ll<<60; const double pi=acos(-1); const double eps=1e-8; const ll mod=1e9+7; const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1}; vi a(3000); int n; vi b; int f(int x){ // if(x<3000) return a[x]; if(x==48||x==50||x==65||x==68||x==85) return a[x]; return a[max(0,x-34)]; } int main(){ a[1]=a[2]=1; for(int i=3;i<3000;i++){ vi b; for(int j=0;j>n; b=vi(n); for(int i=0;i>b[i]; sort(b.begin(),b.end()); int g=0,t=0; for(int i=1;i1){ g^=f(i-t); t=i; } g^=f(n-t); // for(int i=0;i<3000;i++) if(f(i)!=a[i]) cout<