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