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