'''simple docstring'''





from math import sqrt





def 	lowerCAmelCase_				(					snake_case_       : int			)    ->      int:


     '''simple docstring'''




     UpperCAmelCase_           =   0
     for i in range(1					,    int(sqrt(snake_case_			) + 1			)			):
          if n % i == 0 and i != sqrt(snake_case_			):
               total += i + n // i
          elif i == sqrt(snake_case_			):
               total += i
     return total - n





def 	lowerCAmelCase_				(					snake_case_       : int = 1_00_00			)    ->      int:


     '''simple docstring'''




     UpperCAmelCase_           =   sum(
         i
         for i in range(1					,    snake_case_			)
         if sum_of_divisors(sum_of_divisors(snake_case_			)			) == i and sum_of_divisors(snake_case_			) != i			)
     return total


if __name__ == "__main__":
    print(solution(int(str(input()).strip())))





"""simple docstring"""






def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase )  ->  int:
   if n == 1 or not isinstance(__UpperCAmelCase       ,    __UpperCAmelCase ):
      return 0
   elif n == 2:
      return 1
   else:
      lowercase__:   List[Any]					=      [0, 1]
      for i in range(2       ,    n + 1 ):
         sequence.append(sequence[i - 1] + sequence[i - 2] )

      return sequence[n]



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase )  ->  int:
   lowercase__:   Union[str, Any]					=      0
   lowercase__:   List[Any]					=      2

   while digits < n:
      index += 1
      lowercase__:   Dict					=      len(str(fibonacci(__UpperCAmelCase ) ) )

   return index



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase = 1_0_0_0 )  ->  int:
   return fibonacci_digits_index(__UpperCAmelCase )


if __name__ == "__main__":
       print(solution(int(str(input()).strip())))
