#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vint;
typedef vector<double> vdouble;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<pair<int, int>> vi_i;
typedef vector<pair<double, double>> vd_d;
typedef vector<pair<ll, ll>> vl_l;
typedef vector<pair<ld, ld>> vld_ld;
typedef vector<string> vstring;
typedef pair<int, int> i_i;
typedef pair<double, double> d_d;
typedef pair<ll, ll> l_l;
typedef pair<ld, ld> ld_ld;
template <typename T>
void read(T& x) {
  cin >> x;
}
template <typename T, typename T0>
void read(T& x, T0& y) {
  cin >> x >> y;
}
template <typename T, typename T0, typename T1>
void read(T& x, T0& y, T1& z) {
  cin >> x >> y >> z;
}
template <typename T, typename T0, typename T1, typename T2>
void read(T& x, T0& y, T1& z, T2& w) {
  cin >> x >> y >> z >> w;
}
template <typename T>
void write(T& x) {
  cout << x << endl;
}
template <typename T, typename T0>
void write(T& x, T0& y) {
  cout << x << " " << y << endl;
}
template <typename T, typename T0, typename T1>
void write(T& x, T0& y, T1& z) {
  cout << x << " " << y << " " << z << endl;
}
template <typename T, typename T0, typename T1, typename T2>
void write(T& x, T0& y, T1& z, T2& w) {
  cout << x << " " << y << " " << z << " " << w << endl;
}
template <typename T>
void printvec(const vector<T>& data) {
  for (const auto elm : data) {
    cout << elm << " ";
  }
  cout << endl;
}
int main(int argc, char const* argv[]) {
  vint ls{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;
  read(k);
  cout << ls[k] << endl;
  return 0;
}
