import sys input = lambda:sys.stdin.readline().rstrip() n=int(input()) xy=[tuple(map(int,input().split()))for _ in range(n)] e=[] for i in range(n-1): for j in range(i+1,n): x1,y1=xy[i] x2,y2=xy[j] e.append(((x1-x2)**2+(y1-y2)**2)*1000000+i*1000+j) e.sort() used=[0]*n ans=0 for x in e: _,x=divmod(x,1000000) i,j=divmod(x,1000) if used[i]+used[j]: continue if i==0: used[j]=1 ans+=1 else: used[i]=used[j]=1 print(ans)