import System.IO

toI :: String -> Int
toI = read

main = do
    a <- getLine
    b <- getLine
    c <- getLine
    d <- getLine
    p <- getLine
    let x = (toI a) * (toI p)
    let y = if (toI p) < (toI c) then (toI b) else (toI b) + ((toI p) - (toI c)) * (toI d)
    print $ if x < y then x else y