import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); long ans = (long)h * w; HashMap places = new HashMap<>(); int q = sc.nextInt(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < q; i++) { int y = sc.nextInt(); int x = sc.nextInt(); if (places.containsKey(x)) { if (places.get(x) > y) { ans += y - places.get(x); places.put(x, y); } } else { ans += y - h - 1; places.put(x, y); } sb.append(ans).append("\n"); } System.out.print(sb); } }