a,b,c,x,y=map(int,input().split())


if c==min(a,b,c):
    ans=max(x,y)*c*2
elif (a+b)/2 >=c and x>=y:
    ans=y*c*2+ a*(x-y)
elif (a+b)/2 >=c and x<=y:
    ans=x*c*2 + b*(y-x)
else:
    ans=a*x+b*y
print(ans)