#include <stdio.h>
#include <stdlib.h>

#define EPS 1e-7

int main(void) {
	int n;
	int i,j;
	int count,max;
	double x[300],y[300];
	double cx,cy;
	srand(65537);
	while(scanf("%d",&n)==1 && n!=0) {
		for(i=0;i<n;i++)scanf("%lf%lf",&x[i],&y[i]);
		max=0;
		for(i=0;i<1000000;i++) {
			cx=(double)rand()/RAND_MAX*10.0;
			cy=(double)rand()/RAND_MAX*10.0;
			count=0;
			for(j=0;j<n;j++) {
				if((x[j]-cx)*(x[j]-cx)+(y[j]-cy)*(y[j]-cy)<1+EPS)count++;
			}
			if(count>max)max=count;
			if(max==n)break;
		}
		printf("%d\n",max);
	}
	return 0;
}