a,b,c,x,y = map(int,input().split())
min = x if x<y else y
price=0
if a+b > 2*c:
    price = min*2*c
    if a < c*2 and a<b:
        price+=a*(x-y)
    elif b<c*2 and b<a:
        price+=b*(y-x)
    else:
        price+=2*c*(y-x)
else:
    price = a*x+b*y
print(price)