A,B,C,X,Y = map(int,input().split())
if A > 2*C and B > 2*C:
    print(2*max([X,Y])*C)
elif A > 2*C:
    print(2*C*X+B*Y)
elif B > 2*C:
    print(2*C*Y+A*X)
elif A+B > 2*C:
    if X > Y:
        print(2*min([X,Y])*C + abs(X-Y)*A)
    else:
        print(2*min([X,Y])*C + abs(X-Y)*B)
else:
    print(A*X+B*Y)