


"""simple docstring"""




def     lowercase			(SCREAMING_SNAKE_CASE_		:				list[int] ,			SCREAMING_SNAKE_CASE_		:				str  )   ->						list[int]:
						SCREAMING_SNAKE_CASE													=					int(SCREAMING_SNAKE_CASE_  )

						# Initialize Result
						SCREAMING_SNAKE_CASE													=					[]

						# Traverse through all denomination
						for denomination in reversed(SCREAMING_SNAKE_CASE_  ):
												# Find denominations
												while int(SCREAMING_SNAKE_CASE_  ) >= int(SCREAMING_SNAKE_CASE_  ):
																		total_value -= int(SCREAMING_SNAKE_CASE_  )
																		answer.append(SCREAMING_SNAKE_CASE_  )  # Append the "answers" array

						return answer


# Driver Code
if __name__ == "__main__":
	__UpperCamelCase						=      []
	__UpperCamelCase						=      '''0'''

	if (
	    input('''Do you want to enter your denominations ? (yY/n): ''').strip().lower()
	    == "y"
	):
		__UpperCamelCase						=      int(input('''Enter the number of denominations you want to add: ''').strip())

		for i in range(0, n):
			denominations.append(int(input(f'''Denomination {i}: ''').strip()))
		__UpperCamelCase						=      input('''Enter the change you want to make in Indian Currency: ''').strip()
	else:
		# All denominations of Indian Currency if user does not enter
		__UpperCamelCase						=      [1, 2, 5, 10, 20, 50, 100, 500, 2000]
		__UpperCamelCase						=      input('''Enter the change you want to make: ''').strip()

	if int(value) == 0 or int(value) < 0:
		print('''The total value cannot be zero or negative.''')

	else:
		print(f'''Following is minimal change for {value}: ''')
		__UpperCamelCase						=      find_minimum_change(denominations, value)
		# Print result
		for i in range(len(answer)):
			print(answer[i], end=''' ''')






"""simple docstring"""




def     lowercase			(SCREAMING_SNAKE_CASE_		:				int = 10_00  )   ->						int:
						SCREAMING_SNAKE_CASE													=					2**power
						SCREAMING_SNAKE_CASE													=					0
						while n:
												SCREAMING_SNAKE_CASE							,				SCREAMING_SNAKE_CASE													=					r + n % 10, n // 10
						return r


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


