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:
A = "\
George Washington (1789-1797)\n\
John Adams (1797-1801)\n\
Thomas Jefferson (1801-1809)\n\
James Madison (1809-1817)\n\
James Monroe (1817-1825)\n\
John Quincy Adams (1825-1829)\n\
Andrew Jackson (1829-1837)\n\
Martin Van Buren (1837-1841)\n\
William H. Harrison (1841)\n\
John Tyler (1841-1845)\n\
James K. Polk (1841-1849)\n\
Zachary Taylor (1849-1850)\n\
Millard Fillmore (1850-1853)\n\
Franklin Pierce (1853-1857)\n\
James Buchanan (1857-1861)\n\
Abraham Lincoln (1861-1865)\n\
Andrew Johnson (1865-1869)\n\
Ulysses S. Grant (1869-1877)\n\
Rutherford B. Hayes (1877-1881)\n\
James A. Garfield (1881)\n\
Chester A. Arthur (1881-1885)\n\
Grover Cleveland (1885-1889)\n\
Benjamin Harrison (1889-1893)\n\
Grover Cleveland (1893-1897)\n\
William McKinley (1897-1901)\n\
Theodore Roosevelt (1901-1909)\n\
William H. Taft (1909-1913)\n\
Woodrow Wilson (1913-1921)\n\
Warren G. Harding (1921-1923)\n\
Calvin Coolidge (1923-1929)\n\
Herbert Hoover (1929-1933)\n\
Franklin D. Roosevelt (1933-1945)\n\
Harry S. Truman (1945-1953)\n\
Dwight D. Eisenhower (1953-1961)\n\
John F. Kennedy (1961-1963)\n\
Lyndon B. Johnson (1963-1969)\n\
Richard M. Nixon (1969-1974)\n\
Gerald R. Ford (1974-1977)\n\
Jimmy Carter (1977-1981)\n\
Ronald Reagan (1981-1989)\n\
George H. W. Bush (1989-1993)\n\
Bill Clinton (1993-2001)\n\
George W. Bush (2001-2009)\n\
Barack Hussein Obama (2009-Present)"
n = int(raw_input())
M = A.split("\n")[n - 1].split()[1:-1]
if n == 8:
    print("Van Buren")
else:
    print(M[-1])