import sys input = sys.stdin.readline n = int(input()) xy = [list(map(int,input().split())) for i in range(n)] l = [] for i in range(n-1): for j in range(i+1,n): dis = ((xy[i][0]-xy[j][0])**2+(xy[i][1]-xy[j][1])**2)**0.5 l.append((dis,i,j)) ans = 0 count = [1]*n l.sort() su = n for dis,i,j in l: if count[i] == 0 or count[j] == 0: continue if i != 0: count[i] -= 1 count[j] -= 1 su -= 2 if i == 0: ans += 1 count[j] -= 1 su -= 1 if su == 1: print(ans) exit() print(ans)