import sys import itertools import math def S(): return sys.stdin.readline().rstrip() def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LS(): return list(sys.stdin.readline().rstrip().split()) h,w,q = MI() v = [h]*w ans = h*w for i in range(q): y,x = MI() if y-1 < v[x-1]: ans -= v[x-1]-y+1 v[x-1] = y-1 print(ans)