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