H, W, Q = map(int, input().split()) D = {} d = H*W for i in range(Q): y, x = map(int, input().split()) if x-1 not in D: d-=H+1-y D[x-1]=y else: if D[x-1]>y: d-=D[x-1]-y D[x-1]=y print(d)