import math # 引入数学计算的包
N=105
arr =[[0for i inrange(N)]for i inrange(N)]defreadToArray():
s=input()
nums = s.strip().split()
nums =[int(num)for num in nums]return nums
# 判断坐标(x,y)是否在其中defjudge(li):
cnt =0for i inrange(1, n +1):for j inrange(1, n +1):# 前两层是遍历矩阵for k in li:# 遍历tuple#print(k)
x,y = k[0:2]# 拿到一个tuple
dis =(x-i)*(x-i)+(y-j)*(y-j)
dis = math.sqrt(dis)if dis<=r and arr[i][j]==0:
arr[i][j]=1
cnt +=1print(cnt)
n, m, r = readToArray()[0:3]
li =[]for i inrange(m):
x,y=readToArray()[0:2]# 获取坐标
li.append((x,y))# 放入一个list中
judge(li)