Problem: 

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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:33554432")
using namespace std;
int n;
string S =
    "Washington Adams Jefferson Madison Monroe Adams Jackson Van Harrison "
    "Tyler Polk Taylor Fillmore Pierce Buchanan Lincoln Johnson Grant Hayes "
    "Garfield Arthur Cleveland Harrison Cleveland McKinley Roosevelt Taft "
    "Wilson Harding Coolidge Hoover Roosevelt Truman Eisenhower Kennedy "
    "Johnson Nixon Ford Carter Reagan Bush Clinton Bush Obama ";
int main() {
  cin >> n;
  n--;
  int k = 0;
  while (k < n) {
    if (S[0] == ' ') k++;
    S = S.substr(1);
  }
  for (int i = 0; S[i] != ' '; ++i) cout << S[i];
  if (n == 7) cout << " Buren";
  cout << endl;
  return 0;
}