#include // #include using namespace std; // using namespace atcoder; using ll = long long; using ull = unsigned long long; using P = pair; #define rep(i,n) for(ll i = 0;i < (ll)n;i++) #define ALL(x) (x).begin(),(x).end() #define MOD 1000000007 int main(){ ll h,w,Q; cin >> h >> w >> Q; ll res = h*w; map mp; while(Q--){ ll y,x;cin >> y >> x; if(!mp.count(x))res -= h - y + 1,mp[x] = y; else { if(mp[x] > y)res -= mp[x] - y,mp[x] = y; } cout << res << "\n"; } return 0; }