A, B, C, X, Y = map(int, input().split())
min = A * X + B * Y

for x in range(X+1):
  for y in range(Y+1):
    if x <= y:
      z = 2 * (X - x)
    else:
      z = 2 * (Y - y)
    Sum = A * x + B * y + C * z
    if Sum < min:
      min = Sum

print(Sum)