





from math import sqrt



def 	A_       (  _lowerCAmelCase  )		->				int:
 UpperCamelCase			:      Optional[int] 			=     0
 for i in range(1							,     int(sqrt(_lowerCAmelCase  ) + 1  )  ):
  if n % i == 0 and i != sqrt(_lowerCAmelCase  ):
   total += i + n // i
  elif i == sqrt(_lowerCAmelCase  ):
   total += i
 return total - n



def 	A_       (  _lowerCAmelCase = 1_0000  )		->				int:
 UpperCamelCase			:      Dict 			=     sum(
     i
     for i in range(1							,     _lowerCAmelCase  )
     if sum_of_divisors(sum_of_divisors(_lowerCAmelCase  )  ) == i and sum_of_divisors(_lowerCAmelCase  ) != i  )
 return total


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







def 	A_       (  _lowerCAmelCase							,     _lowerCAmelCase  )		->				int:
 return int(input_a == input_a == 0  )



def 	A_       (  )		->				None:
 print("Truth Table of NOR Gate:"  )
 print("|   Input 1   |  Input 2  | Output |"  )
 print(F"""|      0      |    0      |  {nor_gate(0							,     0  )}     |"""  )
 print(F"""|      0      |    1      |  {nor_gate(0							,     1  )}     |"""  )
 print(F"""|      1      |    0      |  {nor_gate(1							,     0  )}     |"""  )
 print(F"""|      1      |    1      |  {nor_gate(1							,     1  )}     |"""  )


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    main()
