solver::(Int,Int,Int)->(Int,Int)->Int
solver (a,b,c) (x,y) = if (a+b) <= 2*c
                      then (a*x) + (b*y)
                      else if (x > y) && (a > 2*c) then 2*c*x
                      else if (x < y) && (b > 2*c) then 2*c*y
                      else (min x y)*(2*c) + (if x > y then (x-y)*a else (y-x)*b  )

main::IO()
main=do
  d<-getLine
  let a:b:c:x:y:[]=map read (words d)
  print (solver (a,b,c) (x,y))