

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