H, W, Q = map(int, input().split()) temp = {} ans = H*W for i in range(Q): y, x = map(int, input().split()) if x not in temp: temp[x] = y ans -= H-y+1 else: if temp[x] > y: ans -= temp[x]-y temp[x] = y print(ans)