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