I = input().split(" ")
A = int(I[0])
B = int(I[1])
C = int(I[2])
X = int(I[3])
Y = int(I[4])

r = 0

if B >= 2*C or A >= 2*C:
    if X >= Y:
        r = X*C*2
    else:
        r = Y*C*2
elif B + A >= 2*C:
    if X <= Y:
        r += X*C*2
        n = Y-X
        r += n*B
    else:
        r += Y*C*2
        n = X-Y
        r += n*A
else:
    r += A*X        
    r += B*Y

print(r)