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