from operator import itemgetter from itertools import * from bisect import * from collections import * from heapq import * import sys # input=sys.stdin.buffer.readline input=sys.stdin.readline sys.setrecursionlimit(10**6) int1 = lambda x: int(x)-1 p2D = lambda x: print(*x, sep="\n") def II(): return int(input()) def MI(): return map(int, input().split()) def MI1(): return map(int1, input().split()) def LI(): return list(map(int, input().split())) def LI1(): return list(map(int1, input().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def SI(): return input()[:-1] def LLI1(rows_number): return [LI1() for _ in range(rows_number)] dij = [(1, 0), (0, 1), (-1, 0), (0, -1)] n=II() xy=LLI(n) dij=[] for i,(x0,y0) in enumerate(xy): for j,(x1,y1) in enumerate(xy[:i]): dij.append(((x0-x1)**2+(y0-y1)**2,i,j)) dij.sort() fin=[False]*n ans=0 for d,i,j in dij: if fin[i] or fin[j]:continue if i==0 or j==0: fin[i+j]=True ans+=1 n-=1 else: fin[i]=fin[j]=True n-=2 if n==1:break print(ans)