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

average = int((A+B)/2)
total = 0
sub = 0
small = 0
deff = 0

if X>=Y:
    sub = 2*X*C
elif X<Y:
    sub = 2*Y*C

if X>=Y:
    small = Y
    deff = X-Y
    total += deff*A
elif X<Y:
    small = X
    deff = Y-X
    total += deff*B

if average >= C:
    total += small*C*2
elif average < C:
    total += small*average*2

if total >= sub:
    print(sub)
elif total<sub:
    print(total)
