


"""simple docstring"""


# Lint as: python3
import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


UpperCamelCase						:				Tuple             =      re.compile(R"^(?P<major>\d+)" R"\.(?P<minor>\d+)" R"\.(?P<patch>\d+)$")



@total_ordering
@dataclass
class 			lowerCamelCase__						:
						lowerCAmelCase       =     42
						lowerCAmelCase       =     None
						lowerCAmelCase       =     None
						lowerCAmelCase       =     None
						lowerCAmelCase       =     None







						def __a						(							self   :    Optional[int]		):
								A       , A       , A					       = _str_to_version_tuple(self.version_str		)







						def __repr__(							self   :    Optional[int]		):
								return f'{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}'







						@property
						def __a						(							self   :    int		):
								return self.major, self.minor, self.patch







						def __a						(							self   :    Union[str, Any]			,			_lowercase   :    Union[str, Any]		):
								if isinstance(_lowercase			,			_lowercase		):
										return Version(_lowercase		)
								elif isinstance(_lowercase			,			_lowercase		):
										return other
								raise TypeError(f'{other} (type {type(_lowercase		)}) cannot be compared to version.'		)







						def __eq__(							self   :    List[str]			,			_lowercase   :    int		):
								try:
										A					       = self._validate_operand(_lowercase		)
								except (TypeError, ValueError):
										return False
								else:
										return self.tuple == other.tuple







						def __lt__(							self   :    Optional[int]			,			_lowercase   :    List[str]		):
								A					       = self._validate_operand(_lowercase		)
								return self.tuple < other.tuple







						def __hash__(							self   :    Optional[int]		):
								return hash(_version_tuple_to_str(self.tuple		)		)







						@classmethod
						def __a						(							cls   :    List[str]			,			_lowercase   :    List[str]		):
								A					       = {f.name for f in dataclasses.fields(cls		)}
								return cls(**{k: v for k, v in dic.items() if k in field_names}		)







						def __a						(							self   :    str		):
								return self.version_str







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		A					       = _VERSION_REG.match(UpperCamelCase__	)
		if not res:
				raise ValueError(f'Invalid version \'{version_str}\'. Format should be x.y.z with {{x,y,z}} being digits.'	)
		return tuple(int(UpperCamelCase__	) for v in [res.group('major'	), res.group('minor'	), res.group('patch'	)]	)







def  __snake_case       (   UpperCamelCase__	)      ->		Union[str, Any]:







		"""simple docstring"""





		return ".".join(str(UpperCamelCase__	) for v in version_tuple	)









"""simple docstring"""


def  __snake_case       (   )      ->		int:







		"""simple docstring"""





		return 1







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		return 0 if x < 0 else two_pence(x - 2	) + one_pence()







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		return 0 if x < 0 else five_pence(x - 5	) + two_pence(UpperCamelCase__	)







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		return 0 if x < 0 else ten_pence(x - 10	) + five_pence(UpperCamelCase__	)







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		return 0 if x < 0 else twenty_pence(x - 20	) + ten_pence(UpperCamelCase__	)







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		return 0 if x < 0 else fifty_pence(x - 50	) + twenty_pence(UpperCamelCase__	)







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		return 0 if x < 0 else one_pound(x - 100	) + fifty_pence(UpperCamelCase__	)







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		return 0 if x < 0 else two_pound(x - 200	) + one_pound(UpperCamelCase__	)







def  __snake_case       (   UpperCamelCase__ = 200	)      ->		int:







		"""simple docstring"""





		return two_pound(UpperCamelCase__	)


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





