





from math import sqrt







def  _SCREAMING_SNAKE_CASE				(   a  )      ->      int:
					__A	:						List[Any]       =				0
					for i in range(1					,						int(sqrt(a  ) + 1  )  ):
										if n % i == 0 and i != sqrt(a  ):
															total += i + n // i
										elif i == sqrt(a  ):
															total += i
					return total - n







def  _SCREAMING_SNAKE_CASE				(   a = 1_00_00  )      ->      int:
					__A	:						List[Any]       =				sum(
					    i
					    for i in range(1					,						a  )
					    if sum_of_divisors(sum_of_divisors(a  )  ) == i and sum_of_divisors(a  ) != i  )
					return total


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











from itertools import permutations



def _a				(	lowerCamelCase:   tuple )	->						bool:







      '''simple docstring'''






      if num[3] % 2 != 0:
            return False

      if (num[2] + num[3] + num[4]) % 3 != 0:
            return False

      if num[5] % 5 != 0:
            return False

      __A          =				[7, 11, 13, 17]
      for i, test in enumerate(lowerCamelCase ):
            if (num[i + 4] * 1_00 + num[i + 5] * 10 + num[i + 6]) % test != 0:
                  return False
      return True



def _a				(	lowerCamelCase:   int = 10 )	->						int:







      '''simple docstring'''






      return sum(
          int(''''''.join(map(lowerCamelCase					,				lowerCamelCase ) ) )
          for num in permutations(range(lowerCamelCase ) )
          if is_substring_divisible(lowerCamelCase ) )


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





