
"""simple docstring"""

import math






class 	_lowercase       :




	def __init__(			self		,			UpperCAmelCase_=0 )		->							Optional[Any]:  # a graph with Node 0,1,...,N-1
			lowerCamelCase					:      int          =   n
			lowerCamelCase					:      Any          =   [
			    [math.inf for j in range(0		,			UpperCAmelCase_ )] for i in range(0		,			UpperCAmelCase_ )
			]  # adjacency matrix for weight
			lowerCamelCase					:      Union[str, Any]          =   [
			    [math.inf for j in range(0		,			UpperCAmelCase_ )] for i in range(0		,			UpperCAmelCase_ )
			]  # dp[i][j] stores minimum distance from i to j




	def       _UpperCamelCase   (			self		,			UpperCAmelCase_		,			UpperCAmelCase_		,			UpperCAmelCase_ )		->							Optional[int]:
			lowerCamelCase					:      int          =   w




	def       _UpperCamelCase   (			self )		->							Union[str, Any]:
			for k in range(0		,			self.n ):
					for i in range(0		,			self.n ):
							for j in range(0		,			self.n ):
									lowerCamelCase					:      Tuple          =   min(self.dp[i][j]		,			self.dp[i][k] + self.dp[k][j] )




	def       _UpperCamelCase   (			self		,			UpperCAmelCase_		,			UpperCAmelCase_ )		->							Optional[Any]:
			return self.dp[u][v]


if __name__ == "__main__":
					_A						=			Graph(5)
					graph.add_edge(0, 2, 9)
					graph.add_edge(0, 4, 1_0)
					graph.add_edge(1, 3, 5)
					graph.add_edge(2, 3, 7)
					graph.add_edge(3, 0, 1_0)
					graph.add_edge(3, 1, 2)
					graph.add_edge(3, 2, 1)
					graph.add_edge(3, 4, 6)
					graph.add_edge(4, 1, 3)
					graph.add_edge(4, 2, 4)
					graph.add_edge(4, 3, 9)
					graph.floyd_warshall()
					graph.show_min(1, 4)
					graph.show_min(0, 3)








"""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())))






