




"""simple docstring"""

from math import sqrt






def 		_snake_case	(   _snake_case				:   int				)       ->   int:






      '''simple docstring'''


      _A     =  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 		_snake_case	(   _snake_case				:   int = 1_00_00				)       ->   int:






      '''simple docstring'''


      _A     =  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())))



def 						SCREAMING_SNAKE_CASE__     (   __lowerCAmelCase     ,		__lowerCAmelCase     ,		__lowerCAmelCase				):
    return round(float(moles / volume				) * nfactor				)





def 						SCREAMING_SNAKE_CASE__     (   __lowerCAmelCase     ,		__lowerCAmelCase     ,		__lowerCAmelCase				):
    return round(float((moles * 0.0_821 * temperature) / (volume)				)				)





def 						SCREAMING_SNAKE_CASE__     (   __lowerCAmelCase     ,		__lowerCAmelCase     ,		__lowerCAmelCase				):
    return round(float((moles * 0.0_821 * temperature) / (pressure)				)				)





def 						SCREAMING_SNAKE_CASE__     (   __lowerCAmelCase     ,		__lowerCAmelCase     ,		__lowerCAmelCase				):
    return round(float((pressure * volume) / (0.0_821 * moles)				)				)


if __name__ == "__main__":
     import doctest

     doctest.testmod()



