



'''simple docstring'''

from math import sqrt
def       __UpperCamelCase	(       UpperCAmelCase					):
 lowercase__    :   List[Any]						= 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       __UpperCamelCase	(       UpperCAmelCase = 1_0000					):
 lowercase__    :   Any						= 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())))


'''simple docstring'''

import re

from filelock import FileLock


try:
  import nltk

  __a:			Tuple	       =       True
except (ImportError, ModuleNotFoundError):
  __a:			List[Any]	       =       False

if NLTK_AVAILABLE:
  with FileLock(""".lock""") as lock:
    nltk.download("""punkt""", quiet=True)
def       __UpperCamelCase	(       UpperCAmelCase					):
 re.sub('''<n>'''		,					''''''		,					UpperCAmelCase					)  # remove pegasus newline char
 assert NLTK_AVAILABLE, "nltk must be installed to separate newlines between sentences. (pip install nltk)"
 return "\n".join(nltk.sent_tokenize(UpperCAmelCase					)					)

