






from math import sqrt






def   a			(						lowerCamelCase_				):






				'''simple docstring'''
				lowercase__    =			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   a			(						lowerCamelCase_ = 1_0000				):






				'''simple docstring'''
				lowercase__    =			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())))












import json
import os
import unittest

from transformers.models.ctrl.tokenization_ctrl import VOCAB_FILES_NAMES, CTRLTokenizer

from ...test_tokenization_common import TokenizerTesterMixin
class       _UpperCAmelCase					(       A__		,unittest.TestCase	):

				"""simple docstring"""




				lowercase__											=       CTRLTokenizer
				lowercase__											=       False
				lowercase__											=       False




				def 				lowercase__   (     self						:    Union[str, Any]  ):

								'''simple docstring'''
								super().setUp()

								# Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
								lowercase__    =			['''adapt''', '''re@@''', '''a@@''', '''apt''', '''c@@''', '''t''', '''<unk>''']
								lowercase__    =			dict(zip(lowerCamelCase,  range(len(lowerCamelCase  )  )  )  )
								lowercase__    =			['''#version: 0.2''', '''a p''', '''ap t</w>''', '''r e''', '''a d''', '''ad apt</w>''', '''''']
								lowercase__    =			{'''unk_token''': '''<unk>'''}

								lowercase__    =			os.path.join(self.tmpdirname,  VOCAB_FILES_NAMES['''vocab_file''']  )
								lowercase__    =			os.path.join(self.tmpdirname,  VOCAB_FILES_NAMES['''merges_file''']  )
								with open(self.vocab_file,  '''w''',  encoding='''utf-8'''  ) as fp:
												fp.write(json.dumps(lowerCamelCase  ) + '''\n'''  )
								with open(self.merges_file,  '''w''',  encoding='''utf-8'''  ) as fp:
												fp.write('''\n'''.join(lowerCamelCase  )  )




				def 				lowercase__   (     self						:    Union[str, Any],  **lowerCamelCase						:    Dict  ):

								'''simple docstring'''
								kwargs.update(self.special_tokens_map  )
								return CTRLTokenizer.from_pretrained(self.tmpdirname,  **lowerCamelCase  )




				def 				lowercase__   (     self						:    Dict,  lowerCamelCase						:    Optional[int]  ):

								'''simple docstring'''
								lowercase__    =			'''adapt react readapt apt'''
								lowercase__    =			'''adapt react readapt apt'''
								return input_text, output_text




				def 				lowercase__   (     self						:    Tuple  ):

								'''simple docstring'''
								lowercase__    =			CTRLTokenizer(self.vocab_file,  self.merges_file,  **self.special_tokens_map  )
								lowercase__    =			'''adapt react readapt apt'''
								lowercase__    =			'''adapt re@@ a@@ c@@ t re@@ adapt apt'''.split()
								lowercase__    =			tokenizer.tokenize(lowerCamelCase  )
								self.assertListEqual(lowerCamelCase,  lowerCamelCase  )

								lowercase__    =			tokens + [tokenizer.unk_token]

								lowercase__    =			[0, 1, 2, 4, 5, 1, 0, 3, 6]
								self.assertListEqual(tokenizer.convert_tokens_to_ids(lowerCamelCase  ),  lowerCamelCase  )




