




from math import sqrt




def 			__magic_name__				( A		:					int   ):






			'''simple docstring'''







			a    =			0
			for i in range(1,  int(sqrt(A   ) + 1   )   ):
						if n % i == 0 and i != sqrt(A   ):
									total += i + n // i
						elif i == sqrt(A   ):
									total += i
			return total - n




def 			__magic_name__				( A		:					int = 10000   ):






			'''simple docstring'''







			a    =			sum(
			    i
			    for i in range(1,  A   )
			    if sum_of_divisors(sum_of_divisors(A   )   ) == i and sum_of_divisors(A   ) != i   )
			return total


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







from torch import nn





class 		_lowercase						(					nn.Module       ):

 def __init__( self	:							Any   ,      snake_case	:							Dict   ,      snake_case	:							Union[str, Any]			)   ->						Dict:

  """simple docstring"""





  super().__init__()
  UpperCamelCase_					:						List[Any] =					class_size
  UpperCamelCase_					:						List[Any] =					embed_size
  # self.mlp1 = nn.Linear(embed_size, embed_size)
  # self.mlp2 = (nn.Linear(embed_size, class_size))
  UpperCamelCase_					:						int =					nn.Linear(snake_case   ,      snake_case			)


 def 						SCREAMING_SNAKE_CASE__   ( self	:							List[str]   ,      snake_case	:							Any			)   ->						str:

  """simple docstring"""





  UpperCamelCase_					:						Dict =					self.mlp(snake_case			)
  return logits



