n,m = map(int,input().split()) t = int(input()) a = [[0for i inrange(m)] for j inrange(n)] #初始的方格 b = [[0for i inrange(m)] for j inrange(n)] #灌溉后的方格 for i inrange(t): r,c = map(int,input().split()) a[r-1][c-1] = 1#初始化出水口 k = int(input()) #遍历 for k inrange(k,0,-1): #一分钟灌溉一次 for i inrange(n): for j inrange(m): if a[i][j]==1: b[i][j]=1#中心值标记 if i-1>=0: #合格范围编辑四个方向的水管 b[i-1][j]=1 if i+1<n: b[i+1][j]=1 if j-1>=0: b[i][j-1]=1 if j+1<m: b[i][j+1]=1 a = b #灌溉完毕递归下一次 #输出 cnt = 0 for i in b: for j in i: cnt += j print(cnt)