#include #include #include #include #include #include #include #define REP(i, n) for(int i=0;i<(n);i++) using namespace std; typedef pair P; const int MAX_N = 100000; array, 2000>, 20000 / 10> fields; bool is_on(pair &a, pair &b) { double dist = (a.first - b.first) * (a.first - b.first) + (a.second - b.second) * (a.second - b.second); dist = sqrt(dist); return dist < 20; } int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; int x, y; cin >> x >> y; N--; fields[x / 20][y / 20].emplace_back(x, y); int ans = 1; REP(k, N) { cin >> x >> y; P current(x, y); int fx = x / 20, fy = y / 20; bool flg = true; for (int i = -1; i <= 1 && flg; ++i) { for (int j = -1; j <= 1 && flg; ++j) { if (fx + i < 0 || fx + i >= 2000 || fy + j < 0 || fy + j >= 2000) continue; for (auto p: fields[fx + i][fy + j]) { if (is_on(p, current)) { flg = false; break; } } } } if (flg) { fields[fx][fy].push_back(current); ans++; } } cout << ans << endl; return 0; }