



'''simple docstring'''

# Lint as: python3
import sys
from collections.abc import Mapping
from typing import TYPE_CHECKING

import numpy as np
import pyarrow as pa

from .. import config
from ..utils.py_utils import map_nested
from .formatting import TensorFormatter


if TYPE_CHECKING:
							import torch

class      __magic_name__						(   TensorFormatter[Mapping, 'torch.Tensor', Mapping]       ):







							def __init__(							self :	int     ,_UpperCAmelCase :	Optional[Any]=None     ,**_UpperCAmelCase :	Dict		):
									super().__init__(features=_UpperCAmelCase		)
									_a					:				str				=							torch_tensor_kwargs
									import torch  # noqa import torch at initialization







							def 							__lowercase      (							self :	Any     ,_UpperCAmelCase :	Tuple		):
									import torch

									if isinstance(_UpperCAmelCase     ,_UpperCAmelCase		) and column:
											if all(
											    isinstance(_UpperCAmelCase     ,torch.Tensor		) and x.shape == column[0].shape and x.dtype == column[0].dtype
											    for x in column		):
													return torch.stack(_UpperCAmelCase		)
									return column







							def 							__lowercase      (							self :	List[str]     ,_UpperCAmelCase :	str		):
									import torch

									if isinstance(_UpperCAmelCase     ,(str, bytes, type(_UpperCAmelCase		))		):
											return value
									elif isinstance(_UpperCAmelCase     ,(np.character, np.ndarray)		) and np.issubdtype(value.dtype     ,np.character		):
											return value.tolist()

									_a					:				Tuple				=							{}

									if isinstance(_UpperCAmelCase     ,(np.number, np.ndarray)		) and np.issubdtype(value.dtype     ,np.integer		):
											_a					:				Union[str, Any]				=							{'dtype': torch.intaa}
									elif isinstance(_UpperCAmelCase     ,(np.number, np.ndarray)		) and np.issubdtype(value.dtype     ,np.floating		):
											_a					:				str				=							{'dtype': torch.floataa}
									elif config.PIL_AVAILABLE and "PIL" in sys.modules:
											import PIL.Image

											if isinstance(_UpperCAmelCase     ,PIL.Image.Image		):
													_a					:				str				=							np.asarray(_UpperCAmelCase		)
									return torch.tensor(_UpperCAmelCase     ,**{**default_dtype, **self.torch_tensor_kwargs}		)







							def 							__lowercase      (							self :	Union[str, Any]     ,_UpperCAmelCase :	Union[str, Any]		):
									import torch

									# support for torch, tf, jax etc.
									if hasattr(_UpperCAmelCase     ,'__array__'		) and not isinstance(_UpperCAmelCase     ,torch.Tensor		):
											_a					:				Dict				=							data_struct.__array__()
									# support for nested types like struct of list of struct
									if isinstance(_UpperCAmelCase     ,np.ndarray		):
											if data_struct.dtype == object:  # torch tensors cannot be instantied from an array of objects
													return self._consolidate([self.recursive_tensorize(_UpperCAmelCase		) for substruct in data_struct]		)
									elif isinstance(_UpperCAmelCase     ,(list, tuple)		):
											return self._consolidate([self.recursive_tensorize(_UpperCAmelCase		) for substruct in data_struct]		)
									return self._tensorize(_UpperCAmelCase		)







							def 							__lowercase      (							self :	Optional[int]     ,_UpperCAmelCase :	dict		):
									return map_nested(self._recursive_tensorize     ,_UpperCAmelCase     ,map_list=_UpperCAmelCase		)







							def 							__lowercase      (							self :	List[str]     ,_UpperCAmelCase :	pa.Table		):
									_a					:				Dict				=							self.numpy_arrow_extractor().extract_row(_UpperCAmelCase		)
									_a					:				Dict				=							self.python_features_decoder.decode_row(_UpperCAmelCase		)
									return self.recursive_tensorize(_UpperCAmelCase		)







							def 							__lowercase      (							self :	Optional[int]     ,_UpperCAmelCase :	pa.Table		):
									_a					:				int				=							self.numpy_arrow_extractor().extract_column(_UpperCAmelCase		)
									_a					:				Optional[int]				=							self.python_features_decoder.decode_column(_UpperCAmelCase     ,pa_table.column_names[0]		)
									_a					:				str				=							self.recursive_tensorize(_UpperCAmelCase		)
									_a					:				int				=							self._consolidate(_UpperCAmelCase		)
									return column







							def 							__lowercase      (							self :	str     ,_UpperCAmelCase :	pa.Table		):
									_a					:				Optional[Any]				=							self.numpy_arrow_extractor().extract_batch(_UpperCAmelCase		)
									_a					:				List[str]				=							self.python_features_decoder.decode_batch(_UpperCAmelCase		)
									_a					:				List[str]				=							self.recursive_tensorize(_UpperCAmelCase		)
									for column_name in batch:
											_a					:				Union[str, Any]				=							self._consolidate(batch[column_name]		)
									return batch









'''simple docstring'''

from math import sqrt



def 					__lowerCamelCase					(				lowerCAmelCase_  )      ->				int:
		_a					:				Dict				=							0
		for i in range(1						,      int(sqrt(lowerCAmelCase_  ) + 1  )  ):
				if n % i == 0 and i != sqrt(lowerCAmelCase_  ):
						total += i + n // i
				elif i == sqrt(lowerCAmelCase_  ):
						total += i
		return total - n



def 					__lowerCamelCase					(				lowerCAmelCase_ = 10000  )      ->				int:
		_a					:				Union[str, Any]				=							sum(
		    i
		    for i in range(1						,      lowerCAmelCase_  )
		    if sum_of_divisors(sum_of_divisors(lowerCAmelCase_  )  ) == i and sum_of_divisors(lowerCAmelCase_  ) != i  )
		return total


if __name__ == "__main__":
							print(solution(int(str(input()).strip())))




