#include <bits/stdc++.h>
using namespace std;

typedef complex<double> P;

const double EPS = 1e-8;
const int N = 300;
const double R = 1;

struct Circle{
  P c;
  double r;
  Circle(P c=P(0,0), double r=0):c(c),r(r){}
};

vector<P> getIntersectCC(Circle c1, Circle c2){
  vector<P> res;
  double r1 = c1.r, r2 = c2.r, d;
  P p1 = c1.c, p2 = c2.c;
  d = abs(p1-p2);

  if(d < EPS && abs(r1-r2) < EPS) return res; //????????¨?????????????????´???????????????????????????????????????
  if(r1 + r2< d - EPS || d + EPS < abs(r1-r2)) return res; //???????????????

  double a = (r1*r1 - r2*r2 + d*d) / (2*d);
  double h = sqrt(max(r1*r1 - a*a, 0.0));
  P tmp1 = p1 + a / d * (p2-p1);
  P tmp2 = h / d * (p2-p1);

  if(abs(tmp2) < EPS) res.push_back(tmp1);
  else {
    res.push_back(P(real(tmp1) - imag(tmp2), imag(tmp1) + real(tmp2)));
    res.push_back(P(real(tmp1) + imag(tmp2), imag(tmp1) - real(tmp2)));
  }
  return res;
}


int n;
vector<P> v;

int solve(){
  int ans = 1;

  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      vector<P> cc = getIntersectCC(Circle(v[i], R), Circle(v[j], R)); // v[i]??¨v[j]??????????????¢?????¨??????R??¨????????? (?????´?????????????????????????????????????????????)
      if(cc.size() == 0) continue;
      for(int k=0;k<cc.size();k++){
        int res = 0;
        for(int l=0;l<n;l++) if(abs(v[l]-cc[k]) <= R + EPS) res++;
        ans = max(ans, res);
      }
    }
  }

  return ans;
}

int main(){
  while(cin >> n && n){
    v.clear();
    for(int i=0;i<n;i++){
      double x, y;
      cin >> x >> y;
      v.push_back(P(x,y));
    }
    cout << solve() << endl;
  }
}