H,W,Q = map(int, input().split()) L = [H]*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+1 L[X-1] = Y-1 print(ans)