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

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