stdin.ReadLine()
|> fun x -> x.Split(' ')
|> Array.map int
|> fun x -> (x.[0], x.[1], x.[2], x.[3], x.[4])
|> fun (a, b, c, x, y) -> (
  (x * a + y * b)
  |> fun std ->
    if a + b <= c * 2
    then std
    else
      [1..(max x y)]
      |> List.fold (
        fun ret i ->
          a * (max (x - i) 0) +
          b * (max (y - i) 0) +
          c * i * 2
          |> min ret
      ) std
)
|> printfn "%d"
