# input
A, B, C, X, Y = map(int, input().split())

# check
if X > Y:
    print(min(A * X + B * Y, C * (2 * Y) + A * (X - Y), C * (2 * X)))
elif X < Y:
    print(min(A * X + B * Y, C * (2 * X) + A * (Y - X), C * (2 * Y)))
else:
    print(min(A * X + B * Y, C * (2 * X)))