

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