(let* ((a (read))
       (b (read))
       (c (read))
       (x (read))
       (y (read)))
  (princ (min
          (+ (* 2 c (min x y)) (* a (- x (min x y))) (* b (- y (min x y))))
          (+ (* a x) (* b y))) ))