from __future__ import annotations

from functools import lru_cache
from math import ceil

lowerCamelCase_    :		Any							=	100

lowerCamelCase_    :		List[str]							=	set(range(3, NUM_PRIMES, 2))
primes.add(2)
lowerCamelCase_    :		int

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
	if prime not in primes:
		continue
	primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))
@lru_cache(maxsize=100						)
def 							lowerCAmelCase(     __lowerCamelCase						):
					if number_to_partition < 0:
										return set()
					elif number_to_partition == 0:
										return {1}

					__a		 =       set()
					__a		 =       42
					__a		 =       42

					for prime in primes:
										if prime > number_to_partition:
															continue
										for sub in partition(number_to_partition - prime						):
															ret.add(sub * prime						)

					return ret
def 							lowerCAmelCase(     __lowerCamelCase = 5000						):
					for number_to_partition in range(1				,    __lowerCamelCase						):
										if len(partition(__lowerCamelCase						)						) > number_unique_partitions:
															return number_to_partition
					return None


if __name__ == "__main__":
	print(F'''{solution() = }''')





from math import sqrt
def 							lowerCAmelCase(     __lowerCamelCase						):
					__a		 =       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 = 1_0000						):
					__a		 =       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())))




