#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
using namespace std;

int n;
double x[101],y[101];
int count[101];
int main(void){
	while(1){
		memset(count,0,sizeof(count));
		cin >> n;
		if(n==0)break;
		for(int i=0;i<n;i++){
			cin >> x[i] >> y[i];
			for(int j=0;j<i;j++){
				if(sqrt(pow(fabs(x[i]-x[j]),2)+pow(fabs(y[i]-y[j]),2))<2){
					count[i]++;
					count[j]++;
				}
			}
		}
		int ans=0;
		for(int i=0;i<n;i++){
			ans=max(ans,count[i]);
		}
		ans++;
		cout << ans << endl;
	}
    return 0;
}