#include <bits/stdc++.h>
using namespace std;
void split(const string& str, char delim, vector<int>& ret) {
  size_t index = 0;
  while (index < str.size()) {
    size_t next = str.find(delim, index);
    if (next == string::npos) break;
    string tmp = str.substr(index, next - index);
    ret.push_back(atoi(tmp.c_str()));
    index = next + 1;
  }
  string tmp = str.substr(index, str.size() - index);
  ret.push_back(atoi(tmp.c_str()));
}
int main() {
  string 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";
  size_t s;
  cin >> s;
  vector<int> list;
  split(str, ',', list);
  if (s < list.size()) cout << list[s - 1] << endl;
  return 0;
}
