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) -> (
  [1..(max x y)]
  |> List.fold (
    fun ret i ->
      a * (max (x - i) 0) +
      b * (max (y - i) 0) +
      c * i * 2
      |> min ret
  ) (x * a + y * b)
)
|> printfn "%d"