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