local h, w, q = io.read("*n", "*n", "*n") local t = {} local ret = 1LL * w * h for iq = 1, q do local y, x = io.read("*n", "*n") if not t[x] then ret = ret - (h - y + 1) t[x] = y elseif y < t[x] then ret = ret - (t[x] - y) t[x] = y end local z = tostring(ret):gsub("LL", "") print(z) end