#include #include using namespace std; using ll = long long; int main(void){ ll w, h, n; cin >> w >> h >> n; set mark, num; for(int i=0; i> s >> k; mark.insert(s); num.insert(k); } ll ans=h*mark.size()+w*num.size()-(ll)mark.size()*num.size()-n; cout << ans << endl; return 0; }