import java.util.*;
import java.lang.*;

public class ith
{
	static int k;
	static int l;
	static int[][] pole;
	static ArrayList<Integer> x;
	static ArrayList<Integer> y;
	
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		x= new ArrayList<Integer>();
		y=new ArrayList<Integer>();
		
		while(true)
		{
		x.clear();
		y.clear();
			k = sc.nextInt();
			l = sc.nextInt();
			int p=sc.nextInt();
			
			if((k == 0) && (l == 0)) break;
			pole = new int[k][l];
			
			
			int vys = 0;
			
			for(int i = 0; i < p; i++)
			{
				x.add(sc.nextInt()-1);
				y.add(sc.nextInt()-1);
			}
			
			l1: for (int i=0; i<k; i++)
				l2: for (int j=0; j<l; j++)
				{
					for (int ii=0; ii<x.size(); ii++)
						if (x.get(ii)==i) continue l1;
					for (int jj=0; jj<y.size(); jj++)
						if (y.get(jj)==j) continue l2;
					for (int ii=0; ii<x.size(); ii++)
							if (Math.abs(x.get(ii)-i)==Math.abs(y.get(ii)-j))
								continue l2;
					vys++;
					//System.out.println(" . "+(i+1)+" "+(j+1));
				}
			System.out.println(vys);
		}
	}
}


/*import java.util.*;
import java.lang.*;

public class ith
{
	static int k;
	static int l;
	static byte[][] pole;

	public static boolean ok(int a, int b)
	{
		if((a >= 0) && (a < k) && (b >= 0) && (b < l) && (pole[a][b] == 0)) return true;
		else return false;
	}

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		while(true)
		{
		k = sc.nextInt();
		l = sc.nextInt();
		if((k == 0) && (l == 0)) break;
		pole = new byte[k][l];
		
		int n = sc.nextInt();
		int vys = k*l;
		
		for(int i = 0; i < n; i++)
		{
			int a = sc.nextInt()-1;
			int b = sc.nextInt()-1;
			
			int h = k;
			if(h > l) h = l;
			for(int o = 0; o < h; o++)
			{
				if(ok(a+o,b+o)) {pole[a+o][b+o] = 1; vys--;}
				if(ok(a-o,b+o)) {pole[a-o][b+o] = 1;vys--;}
				if(ok(a+o,b-o)) {pole[a+o][b-o] = 1;vys--;}
				if(ok(a-o,b-o)) {pole[a-o][b-o] = 1;vys--;}
			}
			
			for(int o = 0; o < k; o++)
			{	
				if(ok(a+o,b)) {pole[a+o][b] = 1;vys--;}
				if(ok(a-o,b)) {pole[a-o][b] = 1;vys--;}
			}
			for(int p = 0; p < l; p++)
			{
				if(ok(a,b+p)) {pole[a][b+p] = 1;vys--;}
				if(ok(a,b-p)) {pole[a][b-p] = 1;vys--;}
			}
		}
		
		System.out.println(vys);
}
	}
}*/