

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