A,B,C,X,Y = map(int, input().split())

res=0

if X > 0: # buy some A pizza
        if A > 2 * C: # buy 2X * AB pizza
                res += C * 2*X
                Y -= X
        else: # buy A pizza
                res += X * A

if Y > 0: # buy some B pizza
        if B > 2 * C:
                res += C*2*Y
        else:
                res+= Y * B

print(res)