#include using namespace std; int main(){ int W,H,N,S,K,ans; bool mark[1000001] = {}; bool num[1000001] = {}; int Wc = 0; int Hc = 0; cin >> W >> H >> N; for(int i=0;i> S >> K; if(! mark[S]){ mark[S] = true; Wc++; } if(! num[K]){ num[K] = true; Hc++; } } ans = Wc*H + Hc*W - Wc*Hc -N; cout << ans << endl; return 0; }