h, w, q = map(int,input().split()) occupied = [h]*w ans = h*w for _ in range(q): y, x = map(lambda x:int(x)-1,input().split()) if y < occupied[x]: ans -= abs(occupied[x]-y) occupied[x] = y print(ans)