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