#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rrep(i,n) for(int i=(int)(n-1);i>=0;i--) #define ALL(v) v.begin(),v.end() #define RALL(v) v.rbegin(),v.rend() template using V=vector; template using VV=V>; using u128=__int128_t; using ll=long long; int G[2020][2020]; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int h,w,n; cin>>h>>w>>n; rep(i,n){ int r1,c1,r2,c2; cin>>r1>>c1>>r2>>c2; r1--,c1--; G[r1][c1]++; G[r1][c2]--; G[r2][c1]--; G[r2][c2]++; } rep(i,h) rep(j,w) G[i][j+1]+=G[i][j]; rep(j,w) rep(i,h) G[i+1][j]+=G[i][j]; int ans=0; rep(i,h) rep(j,w) if(G[i][j]==0) ans++; cout<