#include #include using namespace std; typedef long long int ll; int main(){ int w,h,n; cin>>w>>h>>n; set vars; set vark; int s,k; for(int i=0;i>s>>k; if(vars.find(s)==vars.end()) vars.insert(s); if(vark.find(k)==vark.end()) vark.insert(k); } ll ans=(w*h)-(w-(int)vars.size())*(h-(int)vark.size()); ans-=n; cout<