#include <bits/stdc++.h>
using namespace std;
static const long long MAX = 1000000;
static const long long INFTY = 1e12;
struct edge {
  long long to, cost;
};
using Graph = vector<vector<int>>;
using _Graph = vector<vector<edge>>;
int H, W;
vector<vector<char>> field;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
vector<bool> seen;
vector<int> colors;
int main() {
  string s;
  int count = 0;
  s = "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;
  cin >> K;
  for (int i = 0, i_len = (s.length()); i < i_len; ++i) {
    if (s[i] == ',') {
      count++;
    }
    if (count == K) {
      cout << s[i - 1] - '0' << endl;
      break;
    }
  }
}
