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