a[10001]={0,1},b[10001],n,i,j,k,s=1;main(x){for(scanf("%d",&n);!a[n]&&s;x++){memcpy(b,a,n*4+4);for(s=i=0;i++n|a[i+j]||b[i+j]++|s++;i