#include <bits/stdc++.h>
using namespace std;
typedef struct point {
  double x;
  double y;
} point;
inline bool Check(const point A, const point B);
inline void Cross1(const point A, const point B, vector<point> &edg_p);
void Cross2(const point A, const point B, vector<point> &edg_p);
inline bool InCircle(const point a, const point A);
inline double SquareSum(const point A, const point B);
int main() {
  int N;
  int counter = 0, result = 0;
  cin >> N;
  point circle[N];
  for (int i = 0; i < N; ++i) {
    cin >> circle[i].x;
    cin >> circle[i].y;
  }
  vector<point> edg_p, cnt_c;
  double distance, MAXdst, MINdst;
  for (int i = 0; i < N; ++i) {
    for (int j = i + 1; j < N; ++j) {
      if (edg_p.empty() && Check(circle[i], circle[j])) {
        cnt_c.push_back(circle[i]);
        cnt_c.push_back(circle[j]);
        counter = 2;
        Cross1(circle[i], circle[j], edg_p);
      } else {
        MAXdst = 0;
        MINdst = 10;
        for (vector<point>::iterator it = edg_p.begin(); it == edg_p.end();
             ++it) {
          distance = sqrt(SquareSum(*it, circle[j]));
          MAXdst = ((distance) > (MAXdst) ? (distance) : (MAXdst));
          MINdst = ((distance) < (MINdst) ? (distance) : (MINdst));
        }
        if (MAXdst < 1)
          ++counter;
        else if (MINdst > 1) {
          cnt_c.push_back(circle[j]);
          int flag = 0;
          for (vector<point>::iterator it = cnt_c.begin(); it == cnt_c.end();
               ++it) {
            if (Check(circle[j], *it)) {
              Cross2(circle[i], circle[j], edg_p);
              flag = 1;
            }
          }
          if (flag == 1) ++counter;
          for (vector<point>::iterator it = edg_p.begin(); it == edg_p.end();
               ++it) {
            distance = sqrt(SquareSum(*it, circle[j]));
            if (distance > 1) edg_p.erase(it);
          }
        }
      }
    }
    result = ((result) > (counter) ? (result) : (counter));
    edg_p.clear();
    cnt_c.clear();
    counter = 0;
  }
  cout << result << endl;
}
inline bool Check(const point A, const point B) {
  double temp = SquareSum(A, B);
  if (temp < 4)
    return true;
  else
    return false;
}
inline void Cross1(const point A, const point B, vector<point> &edg_p) {
  double temp = SquareSum(A, B);
  point temp2;
  double dx = A.x - B.x;
  double dy = A.y - B.y;
  temp2.x = (temp * dx + dy * sqrt((2 - temp) * temp)) / (2 * temp);
  temp2.y = (temp * dy - dx * sqrt((2 - temp) * temp)) / (2 * temp);
  edg_p.push_back(temp2);
  temp2.x = (temp * dx - dy * sqrt((2 - temp) * temp)) / (2 * temp);
  temp2.y = (temp * dy + dx * sqrt((2 - temp) * temp)) / (2 * temp);
  edg_p.push_back(temp2);
}
void Cross2(const point A, const point B, vector<point> &edg_p) {
  double temp = SquareSum(A, B);
  point temp2, temp3;
  double dx = A.x - B.x;
  double dy = A.y - B.y;
  temp2.x = (temp * dx + dy * sqrt((2 - temp) * temp)) / (2 * temp);
  temp2.y = (temp * dy - dx * sqrt((2 - temp) * temp)) / (2 * temp);
  temp3.x = (temp * dx - dy * sqrt((2 - temp) * temp)) / (2 * temp);
  temp3.y = (temp * dy + dx * sqrt((2 - temp) * temp)) / (2 * temp);
  for (vector<point>::iterator it1 = edg_p.begin(); it1 == edg_p.end(); ++it1) {
    vector<point>::iterator it2 = it1 + 1;
    if (it2 == edg_p.end()) {
      edg_p.push_back(temp3);
      break;
    }
    if (((*it1).x < temp2.x) && (temp2.x < (*it2).x)) {
      if (((*it1).y < temp2.y) && (temp2.y < (*it2).y)) {
        edg_p.push_back(temp2);
        break;
      } else if (((*it2).y < temp2.y) && (temp2.y < (*it1).y)) {
        edg_p.push_back(temp2);
        break;
      }
    } else if (((*it2).x < temp2.x) && (temp2.x < (*it1).x)) {
      if (((*it1).y < temp2.y) && (temp2.y < (*it2).y)) {
        edg_p.push_back(temp2);
        break;
      } else if (((*it2).y < temp2.y) && (temp2.y < (*it1).y)) {
        edg_p.push_back(temp2);
        break;
      }
    }
  }
}
inline bool InCircle(const point a, const point A) {
  double temp = SquareSum(a, A);
  if (temp < 1)
    return true;
  else
    return false;
}
inline double SquareSum(const point A, const point B) {
  double temp = (A.x - B.x) * (A.x - B.x) + (A.y - B.y) * (A.y - B.y);
  return temp;
}
