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

Output a single string.
The input contains a single integer *a* (1 ≤ *a* ≤ 40).
s="""George Washington (from 30/04/1789 to 04/03/1797) 
John Adams (from 04/03/1797 to 04/03/1801)
Thomas Jefferson (from 04/03/1801 to 04/03/1809)
James Madison (from 04/03/1809 to 04/03/1817)
James Monroe (from 04/03/1817 to 04/03/1825)
John Adams (from 04/03/1825 to 04/03/1829)
Andrew Jackson (from 04/03/1829 to 04/03/1837)
Martin Buren (from 04/03/1837 to 04/03/1841)
William Harrison (from 04/03/1841 to 04/04/1841)
John Tyler (from 04/04/1841 to 04/03/1845)
James Polk (from 04/03/1845 to 04/03/1849)
Zachary Taylor (from 04/03/1849 to 09/07/1850)
Millard Fillmore (from 09/07/1850 to 04/03/1853)
Franklin Pierce (from 04/03/1853 to 04/03/1857)
James Buchanan (from 04/03/1857 to 04/03/1861)
Abraham Lincoln (from 04/03/1861 to 15/04/1865)
Andrew Johnson (from 15/04/1865 to 04/03/1869)
Ulysses Grant (from 04/03/1869 to 04/03/1877)
Rutherford Hayes (from 04/03/1877 to 04/03/1881)
James Garfield (from 04/03/1881 to 19/09/1881)
Chester Arthur (from 19/09/1881 to 04/03/1885)
Grover Cleveland (from 04/03/1885 to 04/03/1889)
Benjamin Harrison (from 04/03/1889 to 04/03/1893)
Grover Cleveland (from 04/03/1893 to 04/03/1897)
William McKinley (from 04/03/1897 to 14/09/1901)
Theodore Roosevelt (from 14/09/1901 to 04/03/1909)
William Taft (from 04/03/1909 to 04/03/1913)
Woodrow Wilson (from 04/03/1913 to 04/03/1921)
Warren Harding (from 04/03/1921 to 02/08/1923)
Calvin Coolidge (from 02/08/1923 to 04/03/1929)
Herbert Hoover (from 04/03/1929 to 04/03/1933)
Franklin Roosevelt (from 04/03/1933 to 12/04/1945)
Harry Truman (from 12/04/1945 to 20/01/1953)
Dwight Eisenhower (from 20/01/1953 to 20/01/1961)
John Kennedy (from 20/01/1961 to 22/11/1963)
Lyndon Johnson (from 22/11/1963 to 20/01/1969)
Richard Nixon (from 20/01/1969 to 09/08/1974)
Gerald Ford (from 09/08/1974 to 20/01/1977)
Jimmy Carter (from 20/01/1977 to 20/01/1981)
Ronald Reagan (from 20/01/1981 to 20/01/1989)
George Bush (from 20/01/1989 to 20/01/1993)
Bill Clinton (from 20/01/1993 to 20/01/2001)
George Bush (from 20/01/2001 to 20/01/2009)
Barack Obama (from 20/01/2009 to 20/01/2017)
Donald Trump (from 20/01/2017 to 20/01/2021)
Joe Biden (from 20/01/2021 to present)"""
l=list(s.split())
n=int(input())
if n==8:
    print("Van Buren")
else:
    print(l[1+6*(n-1)])