Problem: 

Input

The input contains a single integer a (0 ≤ a ≤ 35).

Output

Output a single integer.

Examples

Input

3


Output

8


Input

10


Output

1024

Solution (in PYTHON):

Solution:
#!/usr/bin/env python
#codeforces 186/2
import sys
n = int(sys.stdin.readline())

data = []
data.append("Washington")
data.append("Adams")
data.append("Jefferson")
data.append("Madison")
data.append("Monroe")
data.append("Adams")
data.append("Jackson")
data.append("Van Buren")
data.append("Harrison")
data.append("Tyler")
data.append("Polk")
data.append("Taylor")
data.append("Fillmore")
data.append("Pierce")
data.append("Buchanan")
data.append("Lincoln")
data.append("Johnson")
data.append("Grant")  
data.append("Hayes")
data.append("Garfield")
data.append("Arthur")
data.append("Cleveland")
data.append("Harrison")
data.append("Cleveland")
data.append("McKinley")
data.append("Roosevelt")
data.append("Taft")
data.append("Wilson")
data.append("Harding")      
data.append("Coolidge")
data.append("Hoover")
data.append("Roosevelt")
data.append("Truman")
data.append("Eisenhower")
data.append("Kennedy")
data.append("Johnson")
data.append("Nixon")

data.append("Ford")
data.append("Carter")
data.append("Reagan")
data.append("Bush")
data.append("Clinton")
data.append("Bush")
data.append("Obama")
data.append("Putin")




            
#print len(data)
print data[n-1]