#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define BET(a,b,c) ((a)<=(b)&&(b)<(c)) #define FOR(i,n) for(int i=0,i##_end=(int(n));i VI; typedef vector VVI; int main() { int W,H,N; cin>>W>>H>>N; VI S(N),K(N); FOR(i,N){ cin>>S[i]>>K[i]; } sort(ALL(S)); S.erase(unique(S.begin(),S.end()),S.end()); sort(ALL(K)); K.erase(unique(K.begin(),K.end()),K.end()); long long ans = 1LL * W * H - (1LL * (W - SZ(S)) * (H - SZ(K))) - N ; cout<