





from math import pi, sqrt





def   lowerCamelCase__       (       UpperCamelCase__     :    float  )     ->	float:



					'''simple docstring'''




					if num <= 0:
										raise ValueError('math domain error'  )
					if num > 171.5:
										raise OverflowError('math range error'  )
					elif num - int(UpperCamelCase__  ) not in (0, 0.5):
										raise NotImplementedError('num must be an integer or a half-integer'  )
					elif num == 0.5:
										return sqrt(UpperCamelCase__  )
					else:
										return 1.0 if num == 1 else (num - 1) * gamma(num - 1  )





def   lowerCamelCase__       (       )     ->	None:



					'''simple docstring'''




					assert gamma(0.5  ) == sqrt(UpperCamelCase__  )
					assert gamma(1  ) == 1.0
					assert gamma(2  ) == 1.0


if __name__ == "__main__":
					from doctest import testmod

					testmod()
					UpperCAmelCase_ 							=       1.0
					while num:
										UpperCAmelCase_ 							=       float(input("""Gamma of: """))
										print(F"gamma({num}) = {gamma(num)}")
										print("""\nEnter 0 to exit...""")










def   lowerCamelCase__       (       )     ->	int:



					'''simple docstring'''




					return 1





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




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





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




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





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




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





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




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





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




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





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




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





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




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





def   lowerCamelCase__       (       UpperCamelCase__     :    int = 200  )     ->	int:



					'''simple docstring'''




					return two_pound(UpperCamelCase__  )


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



