import qualified Data.IntSet as S main :: IO () main = do w <- readLn :: IO Int h <- readLn :: IO Int n <- readLn :: IO Int sk <- map ((\[a,b] -> (a,b)) . (map read . words)) . lines <$> getContents :: IO [(Int,Int)] let w' = S.size . S.fromList $ map fst sk let h' = S.size . S.fromList $ map snd sk print $ w * h - (w-w') * (h-h') - n