import java.util.*;
import java.io.*;
public class ith{

	
	public static void main(String[] args){
		//PrintReader sc = new PrintReader(new BufferedReader(new InputStreamReader(System.in)));
		Scanner sc = new Scanner(System.in);
		while(true){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if (a==0 && b==0 && c==0)
				break;
			
			boolean[] D = new boolean[a+1];
			boolean[] L = new boolean[b+1];
			boolean[] DL = new boolean[a+b+1];
			boolean[] DP = new boolean[a+b+1];
								
			
			sc.nextLine();
			
			int v = a*b;	
					
			for (int i = 0; i< c;i++){
				int x = sc.nextInt();
				int y = sc.nextInt();
				sc.nextLine();
				D[x]=true;
				L[y]=true;
				DL[x+y]=true;
				DP[x-y+b]=true;				
			}
			
			for(int x=1;x<=a;x++)
				for(int y=1;y<=b;y++)
				 if (D[x]==true || L[y]==true || DL[x+y]==true || DP[x-y+b])
						v--;
				 
			
			System.out.println(""+v);
		
		}
	
	}
}