s[99],k[101];w,p,q,i,x,y,t;main(h){for(scanf("%d%d%*d",&w,&h);~scanf("%d%d",&p,&q);x+=!!p,y+=!!q,s[t]=p,k[t++]=q)for(i=t;i--;q*=q!=k[i])p*=p!=s[i];w=!printf("%d",x*h-t+(w-x)*y);}