
"""simple docstring"""

from __future__ import annotations

from collections.abc import Generator
def 		UpperCAmelCase (		):





		'''simple docstring'''


		lowerCamelCase					:      dict[int, int]          =   {}
		lowerCamelCase					:      Optional[Any]          =   2
		while True:
				lowerCamelCase					:      str          =   factor_map.pop(a_,						a_      )
				if factor:
						lowerCamelCase					:      int          =   factor + prime
						while x in factor_map:
								x += factor
						lowerCamelCase					:      List[Any]          =   factor
				else:
						lowerCamelCase					:      List[str]          =   prime
						yield prime
				prime += 1
def 		UpperCAmelCase (		a_ = 1E10      ):





		'''simple docstring'''


		lowerCamelCase					:      Optional[int]          =   sieve()

		lowerCamelCase					:      Optional[Any]          =   1
		while True:
				lowerCamelCase					:      Optional[int]          =   next(a_      )
				if (2 * prime * n) > limit:
						return n
				# Ignore the next prime as the reminder will be 2.
				next(a_      )
				n += 2


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








"""simple docstring"""

def 		UpperCAmelCase (		):





		'''simple docstring'''


		return 1
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


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





		'''simple docstring'''


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





		'''simple docstring'''


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





		'''simple docstring'''


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





		'''simple docstring'''


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





		'''simple docstring'''


		return 0 if x < 0 else one_pound(x - 100      ) + fifty_pence(a_      )
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		return 0 if x < 0 else two_pound(x - 200      ) + one_pound(a_      )
def 		UpperCAmelCase (		a_ = 200      ):





		'''simple docstring'''


		return two_pound(a_      )


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






