from collections import defaultdict H,W,Q = map(int,input().split()) d = defaultdict(lambda: H) seat = H*W for _ in range(Q): y,x=map(int,input().split()) seat -= max(0,d[x]-y+1) d[x]=y-1 print(seat)