#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
bool my_cp(pair<int, int> a, pair<int, int> b) {
  return (double)b.first / (double)(b.second + 1) <
         (double)a.first / (double)(a.second + 1);
}
ll cnt_rep = 0;
ll powmod(ll N, ll P, ll M) {
  cnt_rep++;
  if (P == 0) return 1;
  if (P % 2 == 0) {
    ll t = powmod(N, P / 2, M);
    return t * t % M;
  }
  return (N * powmod(N, P - 1, M)) % M;
}
int main() {
  int a[32] = {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;
  cout << a[K + 1] << endl;
}
