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

x = X
y = Y

cost = 0
if (A+B) >= C*2
  c_num = [X,Y].min
  cost += c_num * C * 2
  c += c_num

  x -= c_num
  y -= c_num

  if x!=0 && y==0
    if A <= C * 2
      cost += x * A
      a += x
    else
      cost += (2 * x * C)
      c += x * 2
    end
  elsif x==0 &&y!=0
    if B <= C * 2
      cost += y * B
      b += y
    else
      cost += (2 * y * C)
      c += y * 2
    end
  end
else
  cost += (A*x) + (B*y)
  a += x
  b += y
end
puts cost