A, B, C, X, Y = map(int, input().split())
if A+B <= C*2 :
    print(A*X+B*Y)
else:
    if X>Y:
        if C*(X-Y)<=A*(X-Y):
            print(C*X*2)
        else:
            print(C*Y*2+A*(X-Y))
    else:
        if C*(Y-X)<=B*(Y-X):
            print(C*Y*2)
        else:
            print(C*X*2+B*(Y-X))