#include //#include using namespace std; //using namespace atcoder; using ll = long long; using ull = unsigned long long; using P = pair; #define rep(i,n) for(ll i = 0;i < (ll)n;i++) #define ALL(x) (x).begin(),(x).end() #define MOD 1000000007 ll pp(ll k){return k*k;} ll d2(pair a,pair b){ return pp(a.first-b.first)+pp(a.second-b.second); } struct info{ ll dist,a,b; bool operator<(const info& o)const{return dist < o.dist;} bool operator>(const info& o)const{return dist > o.dist;} }; int main(){ int n; cin >> n; vector> v(n); rep(i,n)cin >> v[i].first >> v[i].second; priority_queue,greater> que; rep(i,n)for(int j = i+1;j < n;j++){ que.push(info{d2(v[i],v[j]),i,j}); } set era; int res = 0; while(!que.empty()){ info k = que.top();que.pop(); if(era.count(k.a) || era.count(k.b))continue; if(k.dist < d2(v[0],v[k.a]) && k.dist < d2(v[0],v[k.b])){ era.insert(k.a); era.insert(k.b); }else if(k.dist >= d2(v[0],v[k.a])){ era.insert(k.a); res++; }else if(k.dist < d2(v[0],v[k.b])){ era.insert(k.b); res++; }else{ era.insert(k.a); era.insert(k.b); res += 2; } } cout << res << "\n"; return 0; }