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