

Input

The input contains a single integer a (1 ≤ a ≤ 40).

Output

Output a single string.

Examples

Input

2


Output

Adams


Input

8


Output

Van Buren


Input

29


Output

Harding
#include <bits/stdc++.h>
using namespace std;
string t[44];
int main() {
  t[1] = "Washington";
  t[2] = "Adams";
  t[3] = "Jefferson";
  t[4] = "Madison";
  t[5] = "Monroe";
  t[6] = "Adams";
  t[7] = "Jackson";
  t[8] = "Van Buren";
  t[9] = "Harrison";
  t[10] = "Tyler";
  t[11] = "Polk";
  t[12] = "Taylor";
  t[13] = "Fillmore";
  t[14] = "Pierce";
  t[15] = "Buchanan";
  t[16] = "Lincoln";
  t[17] = "Johnson";
  t[18] = "Grant";
  t[19] = "Hayes";
  t[20] = "Garfield";
  t[21] = "Arthur";
  t[22] = "Cleveland";
  t[23] = "Harrison";
  t[24] = "Cleveland";
  t[25] = "McKinley";
  t[26] = "Roosevelt";
  t[27] = "Taft";
  t[28] = "Wilson";
  t[29] = "Harding";
  t[30] = "Coolidge";
  t[31] = "Hoover";
  t[32] = "Roosevelt";
  t[33] = "Truman";
  t[34] = "Eisenhower";
  t[35] = "Kennedy";
  t[36] = "Johnson";
  t[37] = "Nixon";
  t[38] = "Ford";
  t[39] = "Carter";
  t[40] = "Reagan";
  int n;
  cin >> n;
  cout << t[n] << endl;
  return 0;
}
