#include using namespace std; using ll = long long; int main(){ ll H, W, Q, ans, x, y, mi; cin >> H >> W >> Q; map mp; ans = H*W; while(Q){ Q--; cin >> x >> y; swap(x, y); mi = H+1; if (mp.count(x)){ mi = mp[x]; mp[x] = min(mi, y); } else mp[x] = y; ans -= max(mi-y, 0LL); cout << ans << endl; } return 0; }