

'''simple docstring'''
from dataclasses import dataclass
from typing import Tuple

import numpy as np
import torch


@dataclass
class        a__  :
   _SCREAMING_SNAKE_CASE   :					Any     	=							42  # [batch_size x 3]
   _SCREAMING_SNAKE_CASE   :					Optional[Any]     	=							42  # [batch_size x 3]
   _SCREAMING_SNAKE_CASE   :					List[Any]     	=							42  # [batch_size x 3]
   _SCREAMING_SNAKE_CASE   :					Union[str, Any]     	=							42  # [batch_size x 3]
   _SCREAMING_SNAKE_CASE   :					List[Any]     	=							42
   _SCREAMING_SNAKE_CASE   :					Union[str, Any]     	=							42
   _SCREAMING_SNAKE_CASE   :					Optional[Any]     	=							42
   _SCREAMING_SNAKE_CASE   :					Optional[Any]     	=							42
   _SCREAMING_SNAKE_CASE   :					Optional[int]     	=							42


   def 						_lowerCamelCase       (			self  ):





      """simple docstring"""





      assert self.x.shape[0] == self.y.shape[0] == self.z.shape[0] == self.origin.shape[0]
      assert self.x.shape[1] == self.y.shape[1] == self.z.shape[1] == self.origin.shape[1] == 3
      assert len(self.x.shape  ) == len(self.y.shape  ) == len(self.z.shape  ) == len(self.origin.shape  ) == 2


   def 						_lowerCamelCase       (			self  ):





      """simple docstring"""





      return torch.from_numpy(np.array([self.width, self.height]      ,    dtype=np.floataa  )  )


   def 						_lowerCamelCase       (			self  ):





      """simple docstring"""





      return torch.from_numpy(np.array([self.x_fov, self.y_fov]      ,    dtype=np.floataa  )  )


   def 						_lowerCamelCase       (			self  ):





      """simple docstring"""





      _lowercase      :				List[Any]      					=       torch.arange(self.height * self.width  )
      _lowercase      :				Union[str, Any]      					=       torch.stack(
          [
              pixel_indices % self.width,
              torch.div(_SCREAMING_SNAKE_CASE      ,    self.width      ,    rounding_mode="trunc"  ),
          ]      ,    axis=1      ,    )
      return coords


   @property
   def 						_lowerCamelCase       (			self  ):





      """simple docstring"""





      _lowercase      :				Dict      					=       self.shape
      _lowercase      :				Any      					=       int(np.prod(_SCREAMING_SNAKE_CASE  )  )

      _lowercase      :				int      					=       self.get_image_coords()
      _lowercase      :				List[Any]      					=       torch.broadcast_to(coords.unsqueeze(0  )      ,    [batch_size * inner_batch_size, *coords.shape]  )
      _lowercase      :				Optional[int]      					=       self.get_camera_rays(_SCREAMING_SNAKE_CASE  )

      _lowercase      :				Tuple      					=       rays.view(_SCREAMING_SNAKE_CASE      ,    inner_batch_size * self.height * self.width      ,    2      ,    3  )

      return rays


   def 						_lowerCamelCase       (			self      ,    _UpperCamelCase  ):





      """simple docstring"""





      _lowercase      :				Optional[Any]      					=       coords.shape
      assert n_coords == 2
      assert batch_size == self.origin.shape[0]

      _lowercase      :				str      					=       coords.view(_SCREAMING_SNAKE_CASE      ,    -1      ,    2  )

      _lowercase      :				Union[str, Any]      					=       self.resolution()
      _lowercase      :				Tuple      					=       self.fov()

      _lowercase      :				List[str]      					=       (flat.float() / (res - 1)) * 2 - 1
      _lowercase      :				Any      					=       fracs * torch.tan(fov / 2  )

      _lowercase      :				Dict      					=       fracs.view(_SCREAMING_SNAKE_CASE      ,    -1      ,    2  )
      _lowercase      :				Dict      					=       (
          self.z.view(_SCREAMING_SNAKE_CASE      ,    1      ,    3  )
          + self.x.view(_SCREAMING_SNAKE_CASE      ,    1      ,    3  ) * fracs[:, :, :1]
          + self.y.view(_SCREAMING_SNAKE_CASE      ,    1      ,    3  ) * fracs[:, :, 1:]
      )
      _lowercase      :				int      					=       directions / directions.norm(dim=-1      ,    keepdim=_SCREAMING_SNAKE_CASE  )
      _lowercase      :				int      					=       torch.stack(
          [
              torch.broadcast_to(self.origin.view(_SCREAMING_SNAKE_CASE      ,    1      ,    3  )      ,    [batch_size, directions.shape[1], 3]  ),
              directions,
          ]      ,    dim=2      ,    )
      return rays.view(_SCREAMING_SNAKE_CASE      ,    *_SCREAMING_SNAKE_CASE      ,    2      ,    3  )






   def 						_lowerCamelCase       (			self      ,    _UpperCamelCase      ,    _UpperCamelCase  ):





      """simple docstring"""





      assert width * self.height == height * self.width, "The aspect ratio should not change."
      return DifferentiableProjectiveCamera(
          origin=self.origin      ,    x=self.x      ,    y=self.y      ,    z=self.z      ,    width=_SCREAMING_SNAKE_CASE      ,    height=_SCREAMING_SNAKE_CASE      ,    x_fov=self.x_fov      ,    y_fov=self.y_fov      ,    )







def  _A		(     snake_case					)      ->     DifferentiableProjectiveCamera:
   _lowercase      :				Any      					=       []
   _lowercase      :				Optional[Any]      					=       []
   _lowercase      :				List[str]      					=       []
   _lowercase      :				Optional[int]      					=       []
   for theta in np.linspace(0		,							2 * np.pi		,							num=20					):
      _lowercase      :				List[str]      					=       np.array([np.sin(__snake_case					), np.cos(__snake_case					), -0.5]					)
      z /= np.sqrt(np.sum(z**2					)					)
      _lowercase      :				int      					=       -z * 4
      _lowercase      :				int      					=       np.array([np.cos(__snake_case					), -np.sin(__snake_case					), 0.0]					)
      _lowercase      :				Any      					=       np.cross(__snake_case		,							__snake_case					)
      origins.append(__snake_case					)
      xs.append(__snake_case					)
      ys.append(__snake_case					)
      zs.append(__snake_case					)
   return DifferentiableProjectiveCamera(
       origin=torch.from_numpy(np.stack(__snake_case		,							axis=0					)					).float()		,							x=torch.from_numpy(np.stack(__snake_case		,							axis=0					)					).float()		,							y=torch.from_numpy(np.stack(__snake_case		,							axis=0					)					).float()		,							z=torch.from_numpy(np.stack(__snake_case		,							axis=0					)					).float()		,							width=__snake_case		,							height=__snake_case		,							x_fov=0.7		,							y_fov=0.7		,							shape=(1, len(__snake_case					))		,							)









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






