





'''simple docstring'''




import math
import sys



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				Optional[Any]		=			""""""
		try:
				with open(lowerCamelCase_			,			"""rb"""	) as binary_file:
						SCREAMING_SNAKE_CASE :				str		=			binary_file.read()
				for dat in data:
						SCREAMING_SNAKE_CASE :				List[Any]		=			f'''{dat:08b}'''
						result += curr_byte
				return result
		except OSError:
				print("""File not accessible"""	)
				sys.exit()



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				Dict		=			{"""0""": """0""", """1""": """1"""}
		SCREAMING_SNAKE_CASE,							SCREAMING_SNAKE_CASE :				List[Any]		=			"""""", """"""
		SCREAMING_SNAKE_CASE :				Optional[Any]		=			len(lowerCamelCase_	)

		for i in range(len(lowerCamelCase_	)	):
				curr_string += data_bits[i]
				if curr_string not in lexicon:
						continue

				SCREAMING_SNAKE_CASE :				Union[str, Any]		=			lexicon[curr_string]
				result += last_match_id
				SCREAMING_SNAKE_CASE :				Any		=			last_match_id + """0"""

				if math.loga(lowerCamelCase_	).is_integer():
						SCREAMING_SNAKE_CASE :				Optional[Any]		=			{}
						for curr_key in list(lowerCamelCase_	):
								SCREAMING_SNAKE_CASE :				List[Any]		=			lexicon.pop(lowerCamelCase_	)
						SCREAMING_SNAKE_CASE :				str		=			new_lex

				SCREAMING_SNAKE_CASE :				Dict		=			last_match_id + """1"""
				index += 1
				SCREAMING_SNAKE_CASE :				Dict		=			""""""
		return result



def 		__A		(  lowerCamelCase_			,			lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				Optional[int]		=			8
		try:
				with open(lowerCamelCase_			,			"""wb"""	) as opened_file:
						SCREAMING_SNAKE_CASE :				List[Any]		=			[
						    to_write[i : i + byte_length]
						    for i in range(0			,			len(lowerCamelCase_	)			,			lowerCamelCase_	)
						]

						if len(result_byte_array[-1]	) % byte_length == 0:
								result_byte_array.append("""10000000"""	)
						else:
								result_byte_array[-1] += "1" + "0" * (
								    byte_length - len(result_byte_array[-1]	) - 1
								)

						for elem in result_byte_array[:-1]:
								opened_file.write(int(lowerCamelCase_			,			2	).to_bytes(1			,			byteorder="""big"""	)	)
		except OSError:
				print("""File not accessible"""	)
				sys.exit()



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				Union[str, Any]		=			0
		for letter in data_bits:
				if letter == "1":
						break
				counter += 1

		SCREAMING_SNAKE_CASE :				Tuple		=			data_bits[counter:]
		SCREAMING_SNAKE_CASE :				Optional[int]		=			data_bits[counter + 1 :]
		return data_bits



def 		__A		(  lowerCamelCase_			,			lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				Optional[int]		=			read_file_binary(lowerCamelCase_	)
		SCREAMING_SNAKE_CASE :				Optional[int]		=			remove_prefix(lowerCamelCase_	)
		SCREAMING_SNAKE_CASE :				Tuple		=			decompress_data(lowerCamelCase_	)
		write_file_binary(lowerCamelCase_			,			lowerCamelCase_	)


if __name__ == "__main__":
							compress(sys.argv[1], sys.argv[2])










'''simple docstring'''




from math import sqrt



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				str		=			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_00_00	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				str		=			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())))



