






def 							lowerCamelCase__ (       __lowerCamelCase     :	int = 1000						):
  __UpperCAmelCase				:      str	 =    2**power
  __UpperCAmelCase				:      List[Any]	 =    0
  while n:
    __UpperCAmelCase ,					__UpperCAmelCase				:      List[str]	 =    r + n % 10, n // 10
  return r


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









def 		_SCREAMING_SNAKE_CASE     ( lowerCAmelCase__=2_81_23						):
		lowerCamelCase_	:     Any 						=      [1] * (limit + 1)

		for i in range(2							,int(limit**0.5						) + 1						):
				sum_divs[i * i] += i
				for k in range(i + 1							,limit // i + 1						):
						sum_divs[k * i] += k + i

		lowerCamelCase_	:     List[str] 						=      set()
		lowerCamelCase_	:     List[str] 						=      0

		for n in range(1							,limit + 1						):
				if sum_divs[n] > n:
						abundants.add(lowerCAmelCase__						)

				if not any((n - a in abundants) for a in abundants						):
						res += n

		return res


if __name__ == "__main__":
		print(solution())
