from collections import defaultdict def main(): H, W, Q = map(int, input().split()) rest_sheets = H * W most_front_other_students = defaultdict(lambda: H + 1) for _ in range(Q): y, x = map(int, input().split()) if most_front_other_students[x] < y: print(rest_sheets) else: rest_sheets -= (most_front_other_students[x] - y) most_front_other_students[x] = y print(rest_sheets) if __name__ == "__main__": main()