

"""simple docstring"""





import itertools
import string
from collections.abc import Generator, Iterable




def   _A  (  UpperCamelCase_     :       Iterable[str],			UpperCamelCase_     :       int)	->						Generator[tuple[str, ...], None, None]:
   '''simple docstring'''


   __lowercase								=						iter(UpperCamelCase_)
   while True:
      __lowercase								=						tuple(itertools.islice(UpperCamelCase_,			UpperCamelCase_))
      if not chunk:
         return
      yield chunk




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


   __lowercase								=						"".join([c.upper() for c in dirty if c in string.ascii_letters])
   __lowercase								=						""

   if len(UpperCamelCase_) < 2:
      return dirty

   for i in range(len(UpperCamelCase_) - 1):
      clean += dirty[i]

      if dirty[i] == dirty[i + 1]:
         clean += "X"

   clean += dirty[-1]

   if len(UpperCamelCase_) & 1:
      clean += "X"

   return clean




def   _A  (  UpperCamelCase_     :       str)	->						list[str]:
   '''simple docstring'''


   __lowercase								=						"ABCDEFGHIKLMNOPQRSTUVWXYZ"
   # we're using a list instead of a '2d' array because it makes the math
   # for setting up the table and doing the actual encoding/decoding simpler
   __lowercase								=						[]

   # copy key chars into the table if they are in `alphabet` ignoring duplicates
   for char in key.upper():
      if char not in table and char in alphabet:
         table.append(UpperCamelCase_)

    # fill the rest of the table in with the remaining alphabet chars
   for char in alphabet:
      if char not in table:
         table.append(UpperCamelCase_)

   return table




def   _A  (  UpperCamelCase_     :       str,			UpperCamelCase_     :       str)	->						str:
   '''simple docstring'''


   __lowercase								=						generate_table(UpperCamelCase_)
   __lowercase								=						prepare_input(UpperCamelCase_)
   __lowercase								=						""

   # https://en.wikipedia.org/wiki/Playfair_cipher#Description
   for chara, chara in chunker(UpperCamelCase_,			2):
      __lowercase		,__lowercase								=						divmod(table.index(UpperCamelCase_),			5)
      __lowercase		,__lowercase								=						divmod(table.index(UpperCamelCase_),			5)

      if rowa == rowa:
         ciphertext += table[rowa * 5 + (cola + 1) % 5]
         ciphertext += table[rowa * 5 + (cola + 1) % 5]
      elif cola == cola:
         ciphertext += table[((rowa + 1) % 5) * 5 + cola]
         ciphertext += table[((rowa + 1) % 5) * 5 + cola]
      else:  # rectangle
         ciphertext += table[rowa * 5 + cola]
         ciphertext += table[rowa * 5 + cola]

   return ciphertext




def   _A  (  UpperCamelCase_     :       str,			UpperCamelCase_     :       str)	->						str:
   '''simple docstring'''


   __lowercase								=						generate_table(UpperCamelCase_)
   __lowercase								=						""

   # https://en.wikipedia.org/wiki/Playfair_cipher#Description
   for chara, chara in chunker(UpperCamelCase_,			2):
      __lowercase		,__lowercase								=						divmod(table.index(UpperCamelCase_),			5)
      __lowercase		,__lowercase								=						divmod(table.index(UpperCamelCase_),			5)

      if rowa == rowa:
         plaintext += table[rowa * 5 + (cola - 1) % 5]
         plaintext += table[rowa * 5 + (cola - 1) % 5]
      elif cola == cola:
         plaintext += table[((rowa - 1) % 5) * 5 + cola]
         plaintext += table[((rowa - 1) % 5) * 5 + cola]
      else:  # rectangle
         plaintext += table[rowa * 5 + cola]
         plaintext += table[rowa * 5 + cola]

   return plaintext







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




