#include <bits/stdc++.h>
const int INF = 10000000;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
using namespace std;
int main() {
  int N, ans;
  double X, Y;
  vector<pair<double, double> > points;
  while (cin >> N, N) {
    ans = 0;
    points.clear();
    for (int i = 0; i < (int)(N); i++) {
      cin >> X >> Y;
      points.push_back(pair<double, double>(X, Y));
    }
    for (double x = 0.0; x <= 10.0; x += 0.01) {
      for (double y = 0.0; y <= 10.0; y += 0.01) {
        int num = 0;
        vector<pair<double, double> >::iterator it = points.begin();
        for (; it != points.end(); it++) {
          double d = (it->first - x) * (it->first - x) +
                     (it->second - y) * (it->second - y);
          if (d < 1.001) {
            num++;
          }
        }
        if (ans < num) ans = num;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
