#include using namespace std; int counter(vector vec,int n){ int i = 0; int c = 0; int l = vec.size(); for(i=0;i> W >> H >> N; vector S(N+1,0); vector K(N+1,0); for(int i=1;i<=N;i++){ cin >> S[i]; cin >> K[i]; } for(int i=1;i<=W;i++){ int c1 = counter(S,i); if(c1 != 0) sum += H-c1; } for(int i=1;i<=H;i++){ int c2 = counter(K,i); if(c2 != 0) sum += W-c2; } cout << sum << endl; return 0; }