
'''simple docstring'''







from random import randint, random
def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: int      ,      __SCREAMING_SNAKE_CASE					: int      ,      __SCREAMING_SNAKE_CASE					: int      ,      __SCREAMING_SNAKE_CASE					: bool = False      ,      __SCREAMING_SNAKE_CASE					: bool = False      ,      __SCREAMING_SNAKE_CASE					: int = 5      ,      ):



						"""simple docstring"""





						lowercase_	:     Dict													=       [[-1] * number_of_cells]  # Create a highway without any car
						lowercase_	:     Union[str, Any]													=       0
						lowercase_	:     Union[str, Any]													=       max(__SCREAMING_SNAKE_CASE      ,      0							)
						while i < number_of_cells:
												lowercase_	:     List[Any]													=       (
												    randint(0      ,      __SCREAMING_SNAKE_CASE							) if random_speed else initial_speed
												)  # Place the cars
												i += (
												    randint(1      ,      max_speed * 2							) if random_frequency else frequency
												)  # Arbitrary number, may need tuning
						return highway
def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: list      ,      __SCREAMING_SNAKE_CASE					: int							):



						"""simple docstring"""





						lowercase_	:     Union[str, Any]													=       0
						lowercase_	:     Dict													=       highway_now[car_index + 1 :]
						for cell in range(len(__SCREAMING_SNAKE_CASE							)							):  # May need a better name for this
												if cells[cell] != -1:  # If the cell is not empty then
																		return distance  # we have the distance we wanted
												distance += 1
						# Here if the car is near the end of the highway
						return distance + get_distance(__SCREAMING_SNAKE_CASE      ,      -1							)
def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: list      ,      __SCREAMING_SNAKE_CASE					: float      ,      __SCREAMING_SNAKE_CASE					: int							):



						"""simple docstring"""





						lowercase_	:     str													=       len(__SCREAMING_SNAKE_CASE							)
						# Beforce calculations, the highway is empty
						lowercase_	:     List[str]													=       [-1] * number_of_cells

						for car_index in range(__SCREAMING_SNAKE_CASE							):
												if highway_now[car_index] != -1:
																		# Add 1 to the current speed of the car and cap the speed
																		lowercase_	:     Dict													=       min(highway_now[car_index] + 1      ,      __SCREAMING_SNAKE_CASE							)
																		# Number of empty cell before the next car
																		lowercase_	:     Optional[Any]													=       get_distance(__SCREAMING_SNAKE_CASE      ,      __SCREAMING_SNAKE_CASE							) - 1
																		# We can't have the car causing an accident
																		lowercase_	:     Optional[Any]													=       min(next_highway[car_index]      ,      __SCREAMING_SNAKE_CASE							)
																		if random() < probability:
																								# Randomly, a driver will slow down
																								lowercase_	:     Dict													=       max(next_highway[car_index] - 1      ,      0							)
						return next_highway
def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: list      ,      __SCREAMING_SNAKE_CASE					: int      ,      __SCREAMING_SNAKE_CASE					: float      ,      __SCREAMING_SNAKE_CASE					: int							):



						"""simple docstring"""





						lowercase_	:     Tuple													=       len(highway[0]							)

						for i in range(__SCREAMING_SNAKE_CASE							):
												lowercase_	:     str													=       update(highway[i]      ,      __SCREAMING_SNAKE_CASE      ,      __SCREAMING_SNAKE_CASE							)
												lowercase_	:     int													=       [-1] * number_of_cells

												for car_index in range(__SCREAMING_SNAKE_CASE							):
																		lowercase_	:     str													=       next_speeds_calculated[car_index]
																		if speed != -1:
																								# Change the position based on the speed (with % to create the loop)
																								lowercase_	:     Union[str, Any]													=       (car_index + speed) % number_of_cells
																								# Commit the change of position
																								lowercase_	:     Optional[Any]													=       speed
												highway.append(__SCREAMING_SNAKE_CASE							)

						return highway


if __name__ == "__main__":
							import doctest

							doctest.testmod()






from math import factorial




def 			UpperCAmelCase__				(			_A      : int = 1_00							):





  '''simple docstring'''







  return sum(int(_A							) for x in str(factorial(_A							)							)							)


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