import java.io.*;
import java.util.*;

class ith {

public static void main(String[] args) throws IOException {
	new ith().run();
}

void vypis(int[][] pole){
for(int i = 0; i < pole.length; i++){
for(int j = 0; j < pole[0].length; j++){
System.out.print(pole[i][j]);
}
System.out.println();
}
System.out.println();
}

void run() throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

String nl = br.readLine();

while(true){
	if(!nl.equals("")){
	String[] pole = nl.split(" ");
	int x = Integer.parseInt(pole[0]);
	int y = Integer.parseInt(pole[1]);
	int z = Integer.parseInt(pole[2]);
	if(x == 0)
		if(y == 0)
			if(z == 0)
				break;
	int qx = 0;
	int qy = 0;
	int px;
	int py;
	int vys = 0;
	boolean [][] sac = new boolean[x][y];
	for(int i = 0; i < z; i++)
	{
		nl = br.readLine();
		pole = nl.split(" ");
		qx = Integer.parseInt(pole[0]);
		qy = Integer.parseInt(pole[1]);
		for(int j = 0; j < y; j++)
		{
			if(!sac[qx - 1][j])
				sac[qx - 1][j] = true;
		}
		for(int j = 0; j < x; j++)
		{
			if(!sac[j][qy - 1])
			sac[j][qy - 1] = true;
		}
		if(qx < qy)
		{
			px = 1;
			py = qy - qx + 1;
		}
		else
		{
			px = qx - qy + 1;
			py = 1;
		}
		while(true)
		{
			if(px > x)
				break;
			if(py > y)
				break;
			if(!sac[px - 1][py - 1])
			sac[px - 1][py - 1] = true;
			px ++;
			py ++;
		}
		qx = x + 1 - qx;
		if(qx < qy)
		{
			px = 1;
			py = qy - qx + 1;
		}
		else
		{
			px = qx - qy + 1;
			py = 1;
		}
		while(true) 
		{
			if(px > x)
				break;
			if(py > y)
				break;
			if(!sac[x - px][py - 1])
			sac[x - px][py - 1] = true;

			px ++;
			py ++;
		}
	}
	for(int i = 0; i < x; i++)
	{
		for(int j = 0; j < y; j++)
		{
			if(sac[i][j] == false)
			{
				vys ++;
			}
		}
	}
	System.out.println(vys);
}
	nl= br.readLine();
	}
}
}
