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