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