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

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