A,B,C,X,Y = gets.chomp.split(" ").map(&:to_i)

half = C*2
ab = A+B

if ab == half || ab < half
  sum_a = A*X
  sum_b = B*Y
  sum_and = sum_a + sum_b
  print(sum_and)
elsif half < ab
  check = 0
  if X > Y
    diff = X - Y
    for i in 1..Y
      check += half
    end
    a_add = A*diff
    half_add = half*diff
    if a_add <= half_add
      print(check+a_add)
    elsif half_add < a_add
      print(check+half_add)
    end
  elsif Y > X
    diff = Y - X
    for i in 1..X
      check += half
    end
    b_add = B*diff
    half_add = half*diff
    if  b_add <= half_add
      print(check+b_add)
    elsif half_add < b_add
      print(check+half_add)
    end
  end
end