

from __future__ import annotations

# This is the precision for this function which can be altered.
# It is recommended for users to keep this number greater than or equal to 10.
lowerCamelCase           =					10




def 			UpperCAmelCase__				(			_A      : int	,      _A      : int	,      _A      : list[int]	,      _A      : int							):





  '''simple docstring'''







  for i in range(_A	,      _A							):
    if array[i] == target:
      return i
  return -1




def 			UpperCAmelCase__				(			_A      : list[int]	,      _A      : int							):





  '''simple docstring'''







  a__  =0
  a__  =len(_A							)
  while left <= right:
    if right - left < precision:
      return lin_search(_A	,      _A	,      _A	,      _A							)

    a__  =(left + right) // 3 + 1
    a__  =2 * (left + right) // 3 + 1

    if array[one_third] == target:
      return one_third
    elif array[two_third] == target:
      return two_third

    elif target < array[one_third]:
      a__  =one_third - 1
    elif array[two_third] < target:
      a__  =two_third + 1

    else:
      a__  =one_third + 1
      a__  =two_third - 1
  else:
    return -1




def 			UpperCAmelCase__				(			_A      : int	,      _A      : int	,      _A      : list[int]	,      _A      : int							):





  '''simple docstring'''







  if left < right:
    if right - left < precision:
      return lin_search(_A	,      _A	,      _A	,      _A							)
    a__  =(left + right) // 3 + 1
    a__  =2 * (left + right) // 3 + 1

    if array[one_third] == target:
      return one_third
    elif array[two_third] == target:
      return two_third

    elif target < array[one_third]:
      return rec_ternary_search(_A	,      one_third - 1	,      _A	,      _A							)
    elif array[two_third] < target:
      return rec_ternary_search(two_third + 1	,      _A	,      _A	,      _A							)
    else:
      return rec_ternary_search(one_third + 1	,      two_third - 1	,      _A	,      _A							)
  else:
    return -1


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       lowerCamelCase           =					input('''Enter numbers separated by comma:\n''').strip()
       lowerCamelCase           =					[int(item.strip()) for item in user_input.split(''',''')]
       assert collection == sorted(collection), f"List must be ordered.\n{collection}."
       lowerCamelCase           =					int(input('''Enter the number to be found in the list:\n''').strip())
       lowerCamelCase           =					ite_ternary_search(collection, target)
       lowerCamelCase           =					rec_ternary_search(0, len(collection) - 1, collection, target)
       if resulta != -1:
              print(f"""Iterative search: {target} found at positions: {resulta}""")
              print(f"""Recursive search: {target} found at positions: {resulta}""")
       else:
              print('''Not found''')



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())))
