

'''simple docstring'''
from __future__ import annotations

from PIL import Image

# Define glider example
_snake_case         =  [
    [0, 1, 0, 0, 0, 0, 0, 0],
    [0, 0, 1, 0, 0, 0, 0, 0],
    [1, 1, 1, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0],
]

# Define blinker example
_snake_case         =  [[0, 1, 0], [0, 1, 0], [0, 1, 0]]







def  _A		(     snake_case					)      ->     list[list[int]]:
   _lowercase      :				int      					=       []
   for i in range(len(snake_case					)					):
      _lowercase      :				int      					=       []
      for j in range(len(cells[i]					)					):
         # Get the number of live neighbours
         _lowercase      :				str      					=       0
         if i > 0 and j > 0:
            neighbour_count += cells[i - 1][j - 1]
         if i > 0:
            neighbour_count += cells[i - 1][j]
         if i > 0 and j < len(cells[i]					) - 1:
            neighbour_count += cells[i - 1][j + 1]
         if j > 0:
            neighbour_count += cells[i][j - 1]
         if j < len(cells[i]					) - 1:
            neighbour_count += cells[i][j + 1]
         if i < len(snake_case					) - 1 and j > 0:
            neighbour_count += cells[i + 1][j - 1]
         if i < len(snake_case					) - 1:
            neighbour_count += cells[i + 1][j]
         if i < len(snake_case					) - 1 and j < len(cells[i]					) - 1:
            neighbour_count += cells[i + 1][j + 1]

         # Rules of the game of life (excerpt from Wikipedia):
         # 1. Any live cell with two or three live neighbours survives.
         # 2. Any dead cell with three live neighbours becomes a live cell.
         # 3. All other live cells die in the next generation.
         #    Similarly, all other dead cells stay dead.
         _lowercase      :				str      					=       cells[i][j] == 1
         if (
             (alive and 2 <= neighbour_count <= 3)
             or not alive
             and neighbour_count == 3
         ):
            next_generation_row.append(1					)
         else:
            next_generation_row.append(0					)

      next_generation.append(snake_case					)
   return next_generation







def  _A		(     snake_case		,							snake_case					)      ->     list[Image.Image]:
   _lowercase      :				List[str]      					=       []
   for _ in range(snake_case					):
      # Create output image
      _lowercase      :				Optional[int]      					=       Image.new("RGB"		,							(len(cells[0]					), len(snake_case					))					)
      _lowercase      :				Optional[Any]      					=       img.load()

      # Save cells to image
      for x in range(len(snake_case					)					):
         for y in range(len(cells[0]					)					):
            _lowercase      :				List[str]      					=       2_55 - cells[y][x] * 2_55
            _lowercase      :				List[str]      					=       (colour, colour, colour)

        # Save image
      images.append(snake_case					)
      _lowercase      :				Tuple      					=       new_generation(snake_case					)
   return images


if __name__ == "__main__":
    _snake_case         =  generate_images(GLIDER, 16)
    images[0].save('out.gif', save_all=True, append_images=images[1:])









'''simple docstring'''
from math import sqrt







def  _A		(     snake_case					)      ->     int:
   _lowercase      :				str      					=       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  _A		(     snake_case = 1_00_00					)      ->     int:
   _lowercase      :				List[Any]      					=       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())))






