#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  str =
      "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, "
      "15, 2, 2, 5, 4, 1, 4, 1, 51";
  vector<string> list;
  int start = 0;
  do {
    int first = str.find_first_of(',', start);
    int tmp_start, tmp_end;
    if (start == 0) {
      tmp_start = start - 1;
      tmp_end = start;
    } else {
      tmp_start = start;
      tmp_end = start + 1;
    }
    if (first == string::npos) {
      list.push_back(str.substr(tmp_start + 1, str.size() - 1 - start));
      break;
    }
    list.push_back(str.substr(tmp_start + 1, first - start - 1));
    start = first + 1;
  } while (true);
  int k;
  cin >> k;
  cout << list.at(k - 1) << endl;
}
