

from math import factorial

lowerCAmelCase__	   = {str(d): factorial(d) for d in range(1_0)}



def 					lowerCAmelCase__							(	SCREAMING_SNAKE_CASE_:							Dict      )			->      int:




				'''simple docstring'''





				return sum(DIGIT_FACTORIAL[d] for d in str(_SCREAMING_SNAKE_CASE      )      )



def 					lowerCAmelCase__							(	)			->      int:




				'''simple docstring'''





				A__        =			7 * factorial(9      ) + 1
				return sum(i for i in range(3	,       _SCREAMING_SNAKE_CASE      ) if sum_of_digit_factorial(_SCREAMING_SNAKE_CASE      ) == i      )


if __name__ == "__main__":
	print(f"""{solution() = }""")


from math import factorial



def 					lowerCAmelCase__							(	SCREAMING_SNAKE_CASE_:							int = 1_0_0      )			->      int:




				'''simple docstring'''





				return sum(map(SCREAMING_SNAKE_CASE_	,       str(factorial(SCREAMING_SNAKE_CASE_      )      )      )      )


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

