def q61(A,B,C,X,Y):
    if X*A+Y*B < 2*C*(A+B):
        print(X*A+Y*B)
        return
    
    if X>Y:
        if A < C:
            print(2*C*(X-1) + A)
        else:
            print(2*C*X)
    else:
        if B < C:
            print(2*C*(Y-1) + B)
        else:
            print(2*C*Y)

A, B, C, X, Y = [int(i) for i in input().split()]

#print(A*X)
#print(B*Y)
q61(A,B,C,X,Y)
