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