#include <bits/stdc++.h>
using namespace std;
int main() {
  string A =
      "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";
  int K = 0;
  cin >> K;
  int count = 0;
  for (int i = 0; i < A.size(); i++) {
    if (count == K - 1) {
      cout << A.at(i + 1);
      if (A.at(i + 2) != ',') {
        cout << A.at(i + 2);
      }
      cout << "" << endl;
      break;
    }
    if (A.at(i) == ',') {
      count++;
    }
  }
}
