import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) N=I() if N==1: print(0) exit() if N==2: print(1) exit() X=[0]*N Y=[0]*N for i in range(N): X[i],Y[i]=MI() M=10**3+1 M2=M*M def enc(d,i,j): temp=d*M2 + i*M + j return temp def dec(temp): d,ij=divmod(temp,M2) i,j=divmod(ij,M) return d,i,j # 取り除いた or 消えた used=[0]*N L=[0]*(N*(N-1)//2) k=0 for i in range(N): for j in range(i+1,N): d=(X[i]-X[j])**2 + (Y[i]-Y[j])**2 L[k]=enc(d,i,j) k+=1 ans=0 L.sort() S=0 for aaa in L: _,i,j=dec(aaa) if i==0: if used[j]==0: ans+=1 used[j]=1 S+=1 if used[i]==0 and used[j]==0: used[i]=1 used[j]=1 S+=2 if S==N-1: break print(ans)