#include using namespace std; using ll = long long; using T = tuple; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector x(n), y(n); for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; } priority_queue, greater > pq; for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { ll dx = x[i] - x[j], dy = y[i] - y[j]; pq.emplace(dx * dx + dy * dy, j, i); } } vector used(n, false); int ans = 0; int rest = n - 1; while (!pq.empty() && rest) { ll dist; int i, j; tie(dist, i, j) = pq.top(); pq.pop(); if (i == 0) { if (used[j]) continue; ++ans; used[j] = true; --rest; } else { if (used[i] || used[j]) continue; used[i] = true; used[j] = true; rest -= 2; } } cout << ans << newl; return 0; }