h, w, q = map(int, input().split()) d = dict() ans = h * w for _ in range(q): y, x = map(int, input().split()) try: ans -= max(0, (h - y + 1) - d[x]) d[x] = max(d[x], (h - y + 1)) except: ans -= (h - y + 1) d[x] = (h - y + 1) print(ans)