a, b, c, x, y = gets.chomp.split(' ').map(&:to_i)

results = [a * x + b * y]
arr = [[a, b, c, x, y], [b, a, c, y, x]]
arr.each do |i|
  aa, bb, cc, xx, yy = i
  total_bb, result = 0, 0
  if cc < aa
    result += 2 * cc * xx
    total_bb += xx
  else
    result += aa * xx
  end
  if total_bb < yy
    if cc < bb
      result += 2 * cc * (yy - total_bb)
    else
      result += bb * (yy - total_bb)
    end
  end
  results << result
end
puts results.min