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