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:
ans = ['Washington (1789-1797)', 'Adams (1797-1801)', 'Jefferson (1801-1809)', 'Madison (1809-1817)', 'Monroe (1817-1825)', 'Adams (1825-1829)', 'Jackson (1829-1837)', 'Van Buren (1837-1841)', 'Harrison (1841)', 'Tyler (1841-1845)', 'Polk (1845-1849)', 'Taylor (1849-1850)', 'Fillmore (1850-1853)', 'Pierce (1853-1857)', 'Buchanan (1857-1861)', 'Lincoln (1861-1865)', 'Johnson (1865-1869)', 'Grant (1869-1877)', 'Hayes (1877-1881)', 'Garfield (1881)', 'Arthur (1881-1885)', 'Cleveland (1885-1889)', 'Harrison (1889-1893)', 'Cleveland (1893-1897)', 'McKinley (1897-1901)', 'Roosevelt (1901-1909)', 'Taft (1909-1913)', 'Wilson (1913-1921)', 'Harding (1921-1923)', 'Coolidge (1923-1929)', 'Hoover (1929-1933)', 'Roosevelt (1933-1945)', 'Truman (1945-1953)', 'Eisenhower (1953-1961)', 'Kennedy (1961-1963)', 'Johnson (1963-1969)', 'Nixon (1969-1974)', 'Ford (1974-1977)', 'Carter (1977-1981)', 'Reagan (1981-1989)', 'Bush (1989-1993)', 'Clinton (1993-2001)', 'Bush (2001-2009)', 'Obama (2009-present)']
n = int (raw_input())
print " ".join(ans[n - 1].split()[:-1])