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