




from sympy import diff, lambdify, symbols
from sympy.functions import *  # noqa: F403


def 		lowerCamelCase__       (						_A	,      _A	,      _A = "x"	,      _A = 10**-10	,      _A = 1	,      ):







	'''simple docstring'''





	snake_case_						       =	symbols(_A				)
	snake_case_						       =	lambdify(_A	,      _A				)
	snake_case_						       =	lambdify(_A	,      diff(_A	,      _A				)				)

	snake_case_						       =	starting_point

	while True:
		if diff_function(_A				) != 0:
			snake_case_						       =	prev_guess - multiplicity * func(_A				) / diff_function(
			    _A				)
		else:
			raise ZeroDivisionError("Could not find root"				) from None

		# Precision is checked by comparing the difference of consecutive guesses
		if abs(next_guess - prev_guess				) < precision:
			return next_guess

		snake_case_						       =	next_guess


# Let's Execute
if __name__ == "__main__":
		# Find root of trigonometric function
		# Find value of pi
		print(f'''The root of sin(x) = 0 is {newton_raphson('sin(x)', 2)}''')

		# Find root of polynomial
		# Find fourth Root of 5
		print(f'''The root of x**4 - 5 = 0 is {newton_raphson('x**4 -5', 0.4 +5J)}''')

		# Find value of e
		print(
		    "The root of log(y) - 1 = 0 is ",
		    f'''{newton_raphson('log(y) - 1', 2, variable='y')}''',
		)

		# Exponential Roots
		print(
		    "The root of exp(x) - 1 = 0 is",
		    f'''{newton_raphson('exp(x) - 1', 10, precision=0.0_05)}''',
		)

		# Find root of cos(x)
		print(f'''The root of cos(x) = 0 is {newton_raphson('cos(x)', 0)}''')






def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	snake_case_						       =	1
	for i in range(1	,      num + 1				):
		fact *= i
	return fact


def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	snake_case_						       =	0
	while number > 0:
		snake_case_						       =	number % 10
		sum_of_digits += last_digit
		snake_case_						       =	number // 10  # Removing the last_digit from the given number
	return sum_of_digits


def 		lowerCamelCase__       (						_A = 100				):







	'''simple docstring'''





	snake_case_						       =	factorial(_A				)
	snake_case_						       =	split_and_add(_A				)
	return result


if __name__ == "__main__":
		print(solution(int(input("Enter the Number: ").strip())))
