#yuki-1338 from collections import defaultdict as ddt H, W, Q = map(int, input().split()) ans = H*W foremost = ddt(int) for _ in range(Q): Y, X = map(int, input().split()) f = foremost[X] if H-Y+1 > f: foremost[X] = H-Y+1 ans -= H-Y+1-f print(ans)