#include <iostream>
#include <complex>
#include <cmath>
#define EPS 1e-9
using namespace std;
typedef complex<double> xy_t;
int n;
xy_t points[301];
int count_in(xy_t center)
{
  int ans=0;
  for(int i=0;i<n;i++)
  {
    if (abs(center-points[i])<1.0+EPS)
      ans++;
  }
  return ans;
}
/*xy_t ppdcl(xy_t a)
{
  return xy_t(a.imag(),-a.real());
}
xy_t delta_v(xy_t C1,xy_t C2)
{
  xy_t half=(C1-C2)*0.5;
  double l=abs(half);
  return ppdcl(half)*sqrt(1-l*l)*(1.0/l);
}*/
int main()
{
  while(1)
  {
    cin>>n;
    if (n==0) break;
    double x,y;
    for(int i=0;i<n;i++)
    {
      cin>>x>>y;
      points[i]=xy_t(x,y);
    }
    int maxn=1;
    for(int i=0;i<n;i++)
    {
      for(int j=i;j<n;j++)
      {
        /*if(abs(points[i]-points[j])<2.0)
        {
          xy_t mid_p=(points[i]+points[j])*0.5;
          maxn=max(maxn,count_in(mid_p+delta_v(points[i],points[j])));
          maxn=max(maxn,count_in(mid_p-delta_v(points[i],points[j])));
        }*/
        double d=abs(points[j]-points[i])/2;
        xy_t v=(points[j]-points[i])/(2*d);
        if(d<1)
        {
            maxn=max(maxn,count_in(points[i]+d*v+sqrt(1-d*d)*v*xy_t(0,+1)));
            maxn=max(maxn,count_in(points[i]+d*v+sqrt(1-d*d)*v*xy_t(0,-1)));
        }
      }
    }
    cout<<maxn<<endl;
  }

}

