
"""simple docstring"""

def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		assert column_title.isupper()
		lowerCamelCase					:      Tuple          =   0
		lowerCamelCase					:      int          =   len(lowerCamelCase_      ) - 1
		lowerCamelCase					:      Any          =   0

		while index >= 0:
				lowerCamelCase					:      Dict          =   (ord(column_title[index]      ) - 64) * pow(26,						lowerCamelCase_      )
				answer += value
				power += 1
				index -= 1

		return answer


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

					testmod()








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






