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

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

else:
    if A >= C and B >= C:
        money = 2 * C * max(X, Y)
        
    elif X > Y:
        money = 2 * C * Y
        X -= Y
        money += A * X
        
    else:
        money = 2 * C * X
        Y -= X
        money += B * Y
print(money)