




"""simple docstring"""

from __future__ import annotations

from itertools import permutations
from random import randint
from timeit import repeat






def 						_snake_case     (					)    ->					tuple[list[int], int]:






      '''simple docstring'''


      _A					   =   [randint(-10_00				,  10_00							) for i in range(10							)]
      _A					   =   randint(-50_00				,  50_00							)
      return (arr, r)


a					=			make_dataset()






def 						_snake_case     (					_snake_case							:					list[int]				,  _snake_case							:					int							)    ->					tuple[int, ...]:






      '''simple docstring'''


      for triplet in permutations(UpperCamelCase_				,  3							):
            if sum(UpperCamelCase_							) == target:
                  return tuple(sorted(UpperCamelCase_							)							)
      return (0, 0, 0)






def 						_snake_case     (					_snake_case							:					list[int]				,  _snake_case							:					int							)    ->					tuple[int, int, int]:






      '''simple docstring'''


      arr.sort()
      _A					   =   len(UpperCamelCase_							)
      for i in range(n - 1							):
            _A   ,    _A					   =   i + 1, n - 1
            while left < right:
                  if arr[i] + arr[left] + arr[right] == target:
                        return (arr[i], arr[left], arr[right])
                  elif arr[i] + arr[left] + arr[right] < target:
                        left += 1
                  elif arr[i] + arr[left] + arr[right] > target:
                        right -= 1
      return (0, 0, 0)






def 						_snake_case     (					)    ->					tuple[float, float]:






      '''simple docstring'''


      _A					   =   '\nfrom __main__ import dataset, triplet_sum1, triplet_sum2\n'
      _A					   =   '\ntriplet_sum1(*dataset)\n'
      _A					   =   '\ntriplet_sum2(*dataset)\n'
      _A					   =   repeat(setup=UpperCamelCase_				,  stmt=UpperCamelCase_				,  repeat=5				,  number=1_00_00							)
      _A					   =   repeat(setup=UpperCamelCase_				,  stmt=UpperCamelCase_				,  repeat=5				,  number=1_00_00							)
      return (min(UpperCamelCase_							), min(UpperCamelCase_							))


if __name__ == "__main__":
       from doctest import testmod

       testmod()
       a					=			solution_times()
       print(F'''The time for naive implementation is {times[0]}.''')
       print(F'''The time for optimized implementation is {times[1]}.''')




"""simple docstring"""





from math import sqrt




def   _A  (  UpperCamelCase_     :       int)	->						int:
   '''simple docstring'''


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




def   _A  (  UpperCamelCase_     :       int = 10000)	->						int:
   '''simple docstring'''


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


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




