/ /and$s{$`}=$k{$'}=1for($w,$h,$n,@a)=<>;print$w*$h-($w-keys%s)*($h-keys%k)-$n