#include using namespace std; typedef long long ll; typedef pair P; #define DUMP(x) cout << #x << " = " << (x) << endl; #define FOR(i, m, n) for (ll i = m; i < n; i++) #define IFOR(i, m, n) for (ll i = n - 1; i >= m; i--) #define REP(i, n) FOR(i, 0, n) #define IREP(i, n) IFOR(i, 0, n) #define FOREACH(x, a) for (auto&(x) : (a)) #define ALL(v) (v).begin(), (v).end() #define SZ(x) ll(x.size()) int main() { ll h, w, q; cin >> h >> w >> q; map mp; ll ans = h * w; REP(_, q) { ll y, x; cin >> y >> x; if (!mp.count(x)) { ans -= h - y + 1; mp[x] = y; } else { ans -= max(0LL, mp[x] - y); mp[x] = min(mp[x], y); } cout << ans << endl; } }