
'''simple docstring'''






def    UpperCAmelCase							(  ):
				return 1





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return 0 if x < 0 else two_pence(x - 2) + one_pence()





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return 0 if x < 0 else five_pence(x - 5) + two_pence(UpperCAmelCase__)





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return 0 if x < 0 else ten_pence(x - 10) + five_pence(UpperCAmelCase__)





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return 0 if x < 0 else twenty_pence(x - 20) + ten_pence(UpperCAmelCase__)





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return 0 if x < 0 else fifty_pence(x - 50) + twenty_pence(UpperCAmelCase__)





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return 0 if x < 0 else one_pound(x - 1_00) + fifty_pence(UpperCAmelCase__)





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return 0 if x < 0 else two_pound(x - 2_00) + one_pound(UpperCAmelCase__)





def    UpperCAmelCase							(  UpperCAmelCase__							:							int = 2_00):
				return two_pound(UpperCAmelCase__)


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


'''simple docstring'''






from __future__ import annotations





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				lowerCamelCase					:			List[Any]									= str(UpperCAmelCase__)
				return len(UpperCAmelCase__) == 9 and set(UpperCAmelCase__) == set('123456789')





def    UpperCAmelCase							(  ):
				for base_num in range(99_99       ,							49_99       ,							-1):
								lowerCamelCase					:			Tuple									= 10_00_02 * base_num
								if is_9_pandigital(UpperCAmelCase__):
												return candidate

				for base_num in range(3_33       ,							99       ,							-1):
								lowerCamelCase					:			List[Any]									= 1_00_20_03 * base_num
								if is_9_pandigital(UpperCAmelCase__):
												return candidate

				return None


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