import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Data.List

main :: IO ()
main = do
  solve <$> getl toInt <*> getl toInt <*> getl toInt >>= print

solve :: Int -> Int -> Int -> Int
solve a b h = (a + b) * h `div` 2

toInt :: String -> Int
toInt = read

getl :: (String -> a) -> IO a
getl f = f <$> getLine
