//???????????????????????????, ?????????????????????????????°????????????????????????????????????????????????2???????????¨???????????£?????\????????¨?????§????????????
//?????£???, 2??????????????????1?????????????????????????????????????????°??????????????????????£????, O(N^2)????????????????????????, ??¨?????§O(N^3)????????§?§£?????????
#include <iostream>
#include <complex>
#include <vector>
using namespace std;
typedef complex<double> Point;

int n;
double x[300], y[300];
vector<Point> points;	//????£???????

int main() {
	while (cin >> n) {
		if (n == 0) break;
		for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
		
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				Point p1 = Point(x[i], y[i]);
				Point p2 = Point(x[j], y[j]);
				if (norm(p1 - p2) < 4) {
					double h = sqrt(1.0 - norm(p1 - p2) / 4.0);
					Point t = p2 - p1; t /= abs(t);
					Point u = t * Point(0, 1);
					points.push_back(p1 + t * abs(p1 - p2) / 2.0 + u * h);
					points.push_back(p1 + t * abs(p1 - p2) / 2.0 - u * h);
				}
			}
		}
		
		double eps = 1e-10;
		int ans = 1;
		for (int i = 0; i < points.size(); i++) {
			double px = points[i].real();
			double py = points[i].imag();
			int cnt = 0;
			for (int j = 0; j < n; j++) {
				if ((x[j] - px) * (x[j] - px) + (y[j] - py) * (y[j] - py) < 1 + eps) {
					cnt++;
				}
			}
			if (ans < cnt) ans = cnt;
		}
		cout << ans << endl;
	}
	return 0;
}