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






_lowerCamelCase					   ={
    "joule": 1.0,
    "kilojoule": 1_0_0_0,
    "megajoule": 1_0_0_0_0_0_0,
    "gigajoule": 1_0_0_0_0_0_0_0_0_0,
    "wattsecond": 1.0,
    "watthour": 3_6_0_0,
    "kilowatthour": 3_6_0_0_0_0_0,
    "newtonmeter": 1.0,
    "calorie_nutr": 4_1_8_6.8,
    "kilocalorie_nutr": 4_1_8_6_8_0_0.0_0,
    "electronvolt": 1.6_0_2_1_7_6_6_3_4E-1_9,
    "britishthermalunit_it": 1_0_5_5.0_5_5_8_5,
    "footpound": 1.355818,
}





def     _a					(						lowerCamelCase,	lowerCamelCase,	lowerCamelCase							):
 if to_type not in ENERGY_CONVERSION or from_type not in ENERGY_CONVERSION:
  lowerCamelCase		:	Dict							=      (
      F'''Incorrect \'from_type\' or \'to_type\' value: {from_type!r}, {to_type!r}\n'''
      F'''Valid values are: {", ".join(lowerCamelCase							)}'''
  )
  raise ValueError(lowerCamelCase							)
 return value * ENERGY_CONVERSION[from_type] / ENERGY_CONVERSION[to_type]


if __name__ == "__main__":
      import doctest

      doctest.testmod()




