A, B, C, X, Y = (int(i) for i in input().split()) 

def result(min, max):
    if A > 2 * C :
        print(min * 2 * C + (max - min) * C * 2)
    else:
        print(min * 2 * C + (max - min) * A)

if A + B > 2 * C :
    if X > Y:
        result(Y, X)
    else:
        result(X, Y)
else:
    print(A * X + B * Y)
