-----Input-----

The input contains a single integer a (1 ≤ a ≤ 40).


-----Output-----

Output a single string.


-----Examples-----
Input
2

Output
Adams

Input
8

Output
Van Buren

Input
29

Output
Harding

Difficulty: MEDIUM
Tags: Implementation

Starter code:

Solutions:
wyfff = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
print(wyfff[int(input())])


presidents = ('Washington', 'Adams', 'Jefferson', 'Madison', 'Monroe', 'Adams', 'Jackson', 'Van Buren', 'Harrison', 'Tyler', 'Polk', 'Taylor', 'Fillmore', 'Pierce', 'Buchanan', 'Lincoln', 'Johnson', 'Grant', 'Hayes', 'Garfield', 'Arthur', 'Cleveland', 'Harrison', 'Cleveland', 'McKinley', 'Roosevelt', 'Taft', 'Wilson', 'Harding', 'Coolidge', 'Hoover', 'Roosevelt', 'Truman', 'Eisenhower', 'Kennedy', 'Johnson', 'Nixon', 'Ford', 'Carter', 'Reagan')
print(presidents[int(input()) - 1])


n = int(input())
if n == 1:
	print('Washington')
elif n == 2:
	print('Adams')
elif n == 3:
	print('Jefferson')
elif n == 4:
	print('Madison')
elif n == 5:
	print('Monroe')
elif n == 6:
	print('Adams')
elif n == 7:
	print('Jackson')
elif n == 8:
	print('Van Buren')
elif n == 9:
	print('Harrison')
elif n == 10:
	print('Tyler')
elif n == 11:
	print('Polk')
elif n == 12:
	print('Taylor')
elif n == 13:
	print('Fillmore')
elif n == 14:
	print('Pierce')
elif n == 15:
	print('Buchanan')
elif n == 16:
	print('Lincoln')
elif n == 17:
	print('Johnson')
elif n == 18:
	print('Grant')
elif n == 19:
	print('Hayes')
elif n == 20:
	print('Garfield')
elif n == 21:
	print('Arthur')
elif n == 22:
	print('Cleveland')
elif n == 23:
	print('Harrison')
elif n == 24:
	print('Cleveland')
elif n == 25:
	print('McKinley')
elif n == 26:
	print('Roosevelt')
elif n == 27:
	print('Taft')
elif n == 28:
	print('Wilson')
elif n == 29:
	print('Harding')
elif n == 30:
	print('Coolidge')
elif n == 31:
	print('Hoover')
elif n == 32:
	print('Roosevelt')
elif n == 33:
	print('Truman')
elif n == 34:
	print('Eisenhower')
elif n == 35:
	print('Kennedy')
elif n == 36:
	print('Johnson')
elif n == 37:
	print('Nixon')
elif n == 38:
	print('Ford')
elif n == 39:
	print('Carter')
elif n == 40:
	print('Reagan')


a = int(input())
print([int('0111212152215121e1515221f22541410121e122e1614221025151f2d221d1240'[a], 36), a // 16 + 49 + (a >> 6) * 214][a >> 4 > 1 and a & 15 == 0])


a = int(input())
l = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
print(l[a])


x = int(input())
y = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
print(y[x - 1])


l = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
n = int(input())
for i in range(len(l)):
	l[i] = int(l[i])
print(int(l[n]))


class InputHandlerObject(object):
	inputs = []

	def getInput(self, n=0):
		res = ''
		inputs = self.inputs
		if not inputs:
			inputs.extend(input().split(' '))
		if n == 0:
			res = inputs[:]
			inputs[:] = []
		while n > len(inputs):
			inputs.extend(input().split(' '))
		if n > 0:
			res = inputs[:n]
			inputs[:n] = []
		return res
InputHandler = InputHandlerObject()
g = InputHandler.getInput
x = int(input())
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
print(a[x - 1])


n = int(input())
pres = [None, 'Washington', 'Adams', 'Jefferson', 'Madison', 'Monroe', 'Adams', 'Jackson', 'Van Buren', 'Harrison', 'Tyler', 'Polk', 'Taylor', 'Fillmore', 'Pierce', 'Buchanan', 'Lincoln', 'Johnson', 'Grant', 'Hayes', 'Garfield', 'Arthur', 'Cleveland', 'Harrison', 'Cleveland', 'McKinley', 'Roosevelt', 'Taft', 'Wilson', 'Harding', 'Coolidge', 'Hoover', 'Roosevelt', 'Truman', 'Eisenhower', 'Kennedy', 'Johnson', 'Nixon', 'Ford', 'Carter', 'Reagan', 'Bush', 'Clinton', 'Bush', 'Obama', 'Trump']
result = pres[n]
print(result)


arr = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
a = int(input())
print(arr[a - 1])


s = 'Washington\tApril 30, 1789\tMarch 4, 1797\nAdams\tMarch 4, 1797\tMarch 4, 1801\t\nJefferson\tMarch 4, 1801\tMarch 4, 1809\t\nMadison\tMarch 4, 1809\tMarch 4, 1817\t\nMonroe\tMarch 4, 1817\tMarch 4, 1825\t\nAdams\tMarch 4, 1825\tMarch 4, 1829\t\nJackson\tMarch 4, 1829\tMarch 4, 1837\t\nVan Buren\tMarch 4, 1837\tMarch 4, 1841\t\nHarrison\tMarch 4, 1841\tApril 4, 1841\t\nTyler\tApril 4, 1841\tMarch 4, 1845\t\nPolk\tMarch 4, 1845\tMarch 4, 1849\t\nTaylor\tMarch 4, 1849\tJuly 9, 1850\t\nFillmore\tJuly 9, 1850\tMarch 4, 1853\t\nPierce\tMarch 4, 1853\tMarch 4, 1857\t\nBuchanan\tMarch 4, 1857\tMarch 4, 1861\t\nLincoln\tMarch 4, 1861\tApril 15, 1865\t\nJohnson\tApril 15, 1865\tMarch 4, 1869\t\nGrant\tMarch 4, 1869\tMarch 4, 1877\t\nHayes\tMarch 4, 1877\tMarch 4, 1881\t\nGarfield\tMarch 4, 1881\tSeptember 19, 1881\t\nArthur\tSeptember 19, 1881\tMarch 4, 1885\t\nCleveland\tMarch 4, 1885\tMarch 4, 1889\t\nHarrison\tMarch 4, 1889\tMarch 4, 1893\t\nCleveland\tMarch 4, 1893\tMarch 4, 1897\t\nMcKinley\tMarch 4, 1897\tSeptember 14, 1901\t\nRoosevelt\tSeptember 14, 1901\tMarch 4, 1909\t\nTaft\tMarch 4, 1909\tMarch 4, 1913\t\nWilson\tMarch 4, 1913\tMarch 4, 1921\t\nHarding\tMarch 4, 1921\tAugust 2, 1923\t\nCoolidge\tAugust 2, 1923\tMarch 4, 1929\t\nHoover\tMarch 4, 1929\tMarch 4, 1933\t\nRoosevelt\tMarch 4, 1933\tApril 12, 1945\t\nTruman\tApril 12, 1945\tJanuary 20, 1953\t\nEisenhower\tJanuary 20, 1953\tJanuary 20, 1961\t\nKennedy\tJanuary 20, 1961\tNovember 22, 1963\t\nJohnson\tNovember 22, 1963\tJanuary 20, 1969\t\nNixon\tJanuary 20, 1969\tAugust 9, 1974\t\nFord\tAugust 9, 1974\tJanuary 20, 1977\t\nCarter\tJanuary 20, 1977\tJanuary 20, 1981\t\nReagan\tJanuary 20, 1981\tJanuary 20, 1989'
data = s.split('\n')
a = int(input()) - 1
print(data[a].split('\t')[0])


ans = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
print(ans[int(input())])