H, W, Q = map(int, input().split()) S = [H+1] * W A = H * W for _ in range(Q): Y, X = map(int, input().split()) if S[X-1] > Y: A -= S[X-1] - Y S[X-1] = Y print(A)