
import unittest

from transformers.testing_utils import CaptureStdout
from transformers.tools.python_interpreter import evaluate






def   lowerCamelCase__							(							__lowerCAmelCase    :    Optional[int]							):




			"""simple docstring"""


			return x + 2





class       _lowerCAmelCase   (      unittest.TestCase			):




				def 	__a		(   self	)							-> str:
							lowerCAmelCase_         =      "x = 3"
							lowerCAmelCase_         =      {}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							assert result == 3
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3}	)

							lowerCAmelCase_         =      "x = y"
							lowerCAmelCase_         =      {"y": 5}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							# evaluate returns the value of the last assignment.
							assert result == 5
							self.assertDictEqual(_UpperCamelCase							,							{"x": 5, "y": 5}	)




				def 	__a		(   self	)							-> List[str]:
							lowerCAmelCase_         =      "y = add_two(x)"
							lowerCAmelCase_         =      {"x": 3}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{"add_two": add_two}							,							state=_UpperCamelCase	)
							assert result == 5
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "y": 5}	)

							# Won't work without the tool
							with CaptureStdout() as out:
										lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							assert result is None
							assert "tried to execute add_two" in out.out




				def 	__a		(   self	)							-> str:
							lowerCAmelCase_         =      "x = 3"
							lowerCAmelCase_         =      {}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							assert result == 3
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3}	)




				def 	__a		(   self	)							-> Union[str, Any]:
							lowerCAmelCase_         =      "test_dict = {'x': x, 'y': add_two(x)}"
							lowerCAmelCase_         =      {"x": 3}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{"add_two": add_two}							,							state=_UpperCamelCase	)
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "y": 5}	)
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "test_dict": {"x": 3, "y": 5}}	)




				def 	__a		(   self	)							-> Optional[int]:
							lowerCAmelCase_         =      "x = 3\ny = 5"
							lowerCAmelCase_         =      {}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							# evaluate returns the value of the last assignment.
							assert result == 5
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "y": 5}	)




				def 	__a		(   self	)							-> Tuple:
							lowerCAmelCase_         =      "text = f'This is x: {x}.'"
							lowerCAmelCase_         =      {"x": 3}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							# evaluate returns the value of the last assignment.
							assert result == "This is x: 3."
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "text": "This is x: 3."}	)




				def 	__a		(   self	)							-> Optional[int]:
							lowerCAmelCase_         =      "if x <= 3:\n    y = 2\nelse:\n    y = 5"
							lowerCAmelCase_         =      {"x": 3}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							# evaluate returns the value of the last assignment.
							assert result == 2
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "y": 2}	)

							lowerCAmelCase_         =      {"x": 8}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							# evaluate returns the value of the last assignment.
							assert result == 5
							self.assertDictEqual(_UpperCamelCase							,							{"x": 8, "y": 5}	)




				def 	__a		(   self	)							-> Any:
							lowerCAmelCase_         =      "test_list = [x, add_two(x)]"
							lowerCAmelCase_         =      {"x": 3}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{"add_two": add_two}							,							state=_UpperCamelCase	)
							self.assertListEqual(_UpperCamelCase							,							[3, 5]	)
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "test_list": [3, 5]}	)




				def 	__a		(   self	)							-> int:
							lowerCAmelCase_         =      "y = x"
							lowerCAmelCase_         =      {"x": 3}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{}							,							state=_UpperCamelCase	)
							assert result == 3
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "y": 3}	)




				def 	__a		(   self	)							-> Any:
							lowerCAmelCase_         =      "test_list = [x, add_two(x)]\ntest_list[1]"
							lowerCAmelCase_         =      {"x": 3}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{"add_two": add_two}							,							state=_UpperCamelCase	)
							assert result == 5
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "test_list": [3, 5]}	)

							lowerCAmelCase_         =      "test_dict = {'x': x, 'y': add_two(x)}\ntest_dict['y']"
							lowerCAmelCase_         =      {"x": 3}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{"add_two": add_two}							,							state=_UpperCamelCase	)
							assert result == 5
							self.assertDictEqual(_UpperCamelCase							,							{"x": 3, "test_dict": {"x": 3, "y": 5}}	)




				def 	__a		(   self	)							-> Optional[int]:
							lowerCAmelCase_         =      "x = 0\nfor i in range(3):\n    x = i"
							lowerCAmelCase_         =      {}
							lowerCAmelCase_         =      evaluate(_UpperCamelCase							,							{"range": range}							,							state=_UpperCamelCase	)
							assert result == 2
							self.assertDictEqual(_UpperCamelCase							,							{"x": 2, "i": 2}	)





from math import sqrt






def   lowerCamelCase__							(							__lowerCAmelCase    :    int							):




			"""simple docstring"""


			lowerCAmelCase_         =      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    :    int = 10000							):




			"""simple docstring"""


			lowerCAmelCase_         =      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())))



