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;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "Washington" << endl;
  } else if (n == 2) {
    cout << "Adams" << endl;
  } else if (n == 3) {
    cout << "Jefferson" << endl;
  } else if (n == 4) {
    cout << "Madison" << endl;
  } else if (n == 5) {
    cout << "Monroe" << endl;
  } else if (n == 6) {
    cout << "Adams" << endl;
  } else if (n == 7) {
    cout << "Jackson" << endl;
  } else if (n == 8) {
    cout << "Van Buren" << endl;
  } else if (n == 9) {
    cout << "Harrison" << endl;
  } else if (n == 10) {
    cout << "Tyler" << endl;
  } else if (n == 11) {
    cout << "Polk" << endl;
  } else if (n == 12) {
    cout << "Taylor" << endl;
  } else if (n == 13) {
    cout << "Fillmore" << endl;
  } else if (n == 14) {
    cout << "Pierce" << endl;
  } else if (n == 15) {
    cout << "Buchanan" << endl;
  } else if (n == 16) {
    cout << "Lincoln" << endl;
  } else if (n == 17) {
    cout << "Johnson" << endl;
  } else if (n == 18) {
    cout << "Grant" << endl;
  } else if (n == 19) {
    cout << "Hayes" << endl;
  } else if (n == 20) {
    cout << "Garfield" << endl;
  } else if (n == 21) {
    cout << "Arthur" << endl;
  } else if (n == 22) {
    cout << "Cleveland" << endl;
  } else if (n == 23) {
    cout << "Harrison" << endl;
  } else if (n == 24) {
    cout << "Cleveland" << endl;
  } else if (n == 25) {
    cout << "McKinley" << endl;
  } else if (n == 26) {
    cout << "Roosevelt" << endl;
  } else if (n == 27) {
    cout << "Taft" << endl;
  } else if (n == 28) {
    cout << "Wilson" << endl;
  } else if (n == 29) {
    cout << "Harding" << endl;
  } else if (n == 30) {
    cout << "Coolidge" << endl;
  } else if (n == 31) {
    cout << "Hoover" << endl;
  } else if (n == 32) {
    cout << "Roosevelt" << endl;
  } else if (n == 33) {
    cout << "Truman" << endl;
  } else if (n == 34) {
    cout << "Eisenhower" << endl;
  } else if (n == 35) {
    cout << "Kennedy" << endl;
  } else if (n == 36) {
    cout << "Johnson" << endl;
  } else if (n == 37) {
    cout << "Nixon" << endl;
  } else if (n == 38) {
    cout << "Ford" << endl;
  } else if (n == 39) {
    cout << "Carter" << endl;
  } else if (n == 40) {
    cout << "Reagan" << endl;
  }
}