N=int(input()) F=[tuple(map(int,input().split())) for i in range(N)] LIST=[] for i in range(N): x,y=F[i] for j in range(i+1,N): z,w=F[j] LIST.append(((x-z)**2+(y-w)**2,i,j)) LIST.sort() ANS=0 USE=[0]*N for d,i,j in LIST: if USE[i]==1 or USE[j]==1: continue if i==1: ANS+=1 USE[j]=1 else: USE[i]=1 USE[j]=1 print(ANS)