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() d = {} ans = h*w for i in range(q): y,x = MI() if x-1 in d: if d[x-1] > y-1: ans -= d[x-1] - y + 1 d[x-1] = y - 1 else: d[x-1] = y-1 ans -= h-d[x-1] print(ans)