#include #include #include #include using namespace std; int N; int X[3<<17],Y[3<<17]; bool ex[555][555],vis[555][555]; int id[555][555]; main() { scanf("%d",&N); for(int i=0;ians; queue >Q; Q.push(make_pair(1,1)); vis[1][1]=true; while(!Q.empty()) { int x=Q.front().first,y=Q.front().second; Q.pop(); if(!ex[x][y]&&id[x][y]!=0) { ans.push_back(id[x][y]); for(int dx=-9;dx<=9;dx++)for(int dy=-9;dy<=9;dy++) { if(x+dx>=1&&y+dy>=1&&dx*dx+dy*dy<100) { ex[x+dx][y+dy]=true; } } } if(y<=500&&!vis[x][y+1]) { vis[x][y+1]=true; Q.push(make_pair(x,y+1)); } if(x<=500&&!vis[x+1][y]) { vis[x+1][y]=true; Q.push(make_pair(x+1,y)); } } printf("%d\n",(int)ans.size()); for(int i=0;i