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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
string ans[40] = {"George Washington", "John Adams",         "Thomas Jefferson",
                  "James Madison",     "James Monroe",       "John Adams",
                  "Andrew Jackson",    "Martin Van Buren",   "William Harrison",
                  "John Tyler",        "James Polk",         "Zachary Taylor",
                  "Millard Fillmore",  "Franklin Pierce",    "James Buchanan",
                  "Abraham Lincoln",   "Andrew Johnson",     "Ulysses Grant",
                  "Rutherford Hayes",  "James Garfield",     "Chester Arthur",
                  "Grover Cleveland",  "Benjamin Harrison",  "Grover Cleveland",
                  "William McKinley",  "Theodore Roosevelt", "William Taft",
                  "Woodrow Wilson",    "Warren Harding",     "Calvin Coolidge",
                  "Herbert Hoover",    "Franklin Roosevelt", "Harry Truman",
                  "Dwight Eisenhower", "John Kennedy",       "Lyndon Johnson",
                  "Richard Nixon",     "Gerald Ford",        "Jimmy Carter",
                  "Ronald Reagan"};
int main() {
  int n;
  while (cin >> n) {
    string a = ans[n - 1];
    cout << a.substr(a.find(' ') + 1);
  }
  return 0;
}