import sys def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) N = I() area = [[[] for _ in range(800)] for _ in range(800)] XY = [] R = [-1,0,1] ans = 0 for k in range(N): x,y = MI() XY.append((x,y)) i = x//25 j = y//25 is_eliminated = 0 for di in R: ni = i+di if not (0 <= ni < 800): continue for dj in R: nj = j+dj if not (0 <= nj < 800): continue for l in area[ni][nj]: xl,yl = XY[l] if (x-xl)**2+(y-yl)**2 < 400: is_eliminated = 1 break if is_eliminated: continue else: area[i][j].append(k) ans += 1 print(ans)