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

if A+B > 2*C:
  if X < Y:
    if 2*C <= B:
      Sum = C * Y
    else:
      Sum = C * X + B * (Y - X)
  elif Y < X:
    if 2*C <= A:
      Sum = C * X
    else:
      Sum = C * Y + A * (X - Y)
  else:
    Sum = C * X

print(Sum)