

'''simple docstring'''
from collections import deque







def    _A						(      snake_case	)     ->      Any:
   _lowercase     : Union[str, Any]     	=  len(_UpperCamelCase	)
   _lowercase     : Optional[Any]     	=  deque()
   _lowercase     : Dict     	=  [False for _ in range(_UpperCamelCase	)]
   _lowercase     : str     	=  [-1 for _ in range(_UpperCamelCase	)]
   _lowercase     : List[Any]     	=  index_of[:]

   def strong_connect(snake_case						,				snake_case						,				snake_case	):
      _lowercase     : Tuple     	=  index  # the number when this node is seen
      _lowercase     : Any     	=  index  # lowest rank node reachable from here
      index += 1
      stack.append(_UpperCamelCase	)
      _lowercase     : Any     	=  True

      for w in g[v]:
         if index_of[w] == -1:
            _lowercase     : Optional[Any]     	=  strong_connect(_UpperCamelCase						,				_UpperCamelCase						,				_UpperCamelCase	)
            _lowercase     : List[Any]     	=  (
                lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
            )
         elif on_stack[w]:
            _lowercase     : Dict     	=  (
                lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
            )

      if lowlink_of[v] == index_of[v]:
         _lowercase     : Any     	=  []
         _lowercase     : List[str]     	=  stack.pop()
         _lowercase     : Any     	=  False
         component.append(_UpperCamelCase	)
         while w != v:
            _lowercase     : str     	=  stack.pop()
            _lowercase     : Union[str, Any]     	=  False
            component.append(_UpperCamelCase	)
         components.append(_UpperCamelCase	)
      return index

   _lowercase     : Any     	=  []
   for v in range(_UpperCamelCase	):
      if index_of[v] == -1:
         strong_connect(_UpperCamelCase						,				0						,				_UpperCamelCase	)

   return components







def    _A						(      snake_case						,				snake_case	)     ->      Optional[int]:
   _lowercase     : List[str]     	=  [[] for _ in range(_UpperCamelCase	)]
   for u, v in edges:
      g[u].append(_UpperCamelCase	)
   return g


if __name__ == "__main__":
    # Test
    _snake_case      =    7
    _snake_case      =    [0, 0, 1, 2, 3, 3, 4, 4, 6]
    _snake_case      =    [1, 3, 2, 0, 1, 4, 5, 6, 5]
    _snake_case      =    [(u, v) for u, v in zip(source, target)]
    _snake_case      =    create_graph(n_vertices, edges)

    assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)












'''simple docstring'''





from math import factorial





def       __a      (  _UpperCamelCase:       int = 100       )		->					int:

     """simple docstring"""




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


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


