a,b,c,x,y=map(int,input().split())
if a+b<=2*c:
    print(a*x+b*y)
else:
    if 2*c<=a or 2*c<=b:
        print(max(x,y)*2*c)
    else:
        if x>y:
            print(min(x,y)*2*c+abs(x-y)*a)
        else:
            print(min(x,y)*2*c+abs(x-y)*b)