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

if A + B < 2 * C:
    money = A * X + B * Y

else:
    money = 2 * C * min(X, Y)

    x = X - min(X, Y)
    y = Y - min(X, Y)

    if A < C and y == 0 or B < C and x == 0:
        money += A * x + B * y
    else:
        money += 2 * C * max(x, y)
        
print(money)
