
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class ith {

    public static void main(String[] args) {
        Scanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

        while (true) {
            int lx = s.nextInt();
            int ly = s.nextInt();
            int n = s.nextInt();

            if (lx == 0 && ly == 0) {
                break;
            }

            if (n == 0) {
                System.out.println(lx * ly);
            } else {
                boolean[][] chessboard = new boolean[lx][];

                for (int i = 0; i < ly; i++) {
                    chessboard[i] = new boolean[ly];
                }

                for (int iy = 0; iy < ly; iy++) {
                    for (int ix = 0; ix < lx; ix++) {
                        chessboard[ix][iy] = true;
                    }
                }

                for (int i = 0; i < n; i++) {
                    int x = s.nextInt() - 1;
                    int y = s.nextInt() - 1;

                    chessboard[x][y] = false;
                    
                    // sloupec

                    for (int iy = 0; iy < ly; iy++) {
                        chessboard[x][iy] = false;
                    }

                    // radek

                    for (int ix = 0; ix < lx; ix++) {
                        chessboard[ix][y] = false;
                    }

                    // nahoru vlevo

                    int ix = x;
                    int iy = y;

                    while (ix >= 0 && iy >= 0) {
                        chessboard[ix--][iy--] = false;
                    }

                    // nahoru vpravo

                    ix = x;
                    iy = y;

                    while (ix < lx && iy >= 0) {
                        chessboard[ix++][iy--] = false;
                    }

                    // dolu vlevo

                    ix = x;
                    iy = y;

                    while (ix >= 0 && iy < ly) {
                        chessboard[ix--][iy++] = false;
                    }

                    // dolu vpravo

                    ix = x;
                    iy = y;

                    while (ix < lx && iy < ly) {
                        chessboard[ix++][iy++] = false;
                    }
                }

                //printc(chessboard, lx, ly);

                int can =0;

                for (int iy = 0; iy < ly; iy++) {
                    for (int ix = 0; ix < lx; ix++) {
                        if (chessboard[ix][iy]) {
                            can++;
                        }
                    }
                }
                
                
                System.out.println(can);
            }
        }
    }

    private static void printc(boolean[][] c, int lx, int ly) {
        for (int iy = 0; iy < ly; iy++) {
            for (int ix = 0; ix < lx; ix++) {
                if (c[ix][iy]) {
                    System.out.print("O ");
                } else {
                    System.out.print("X ");
                }
            }

            System.out.println();
        }
    }
}
