#include <bits/stdc++.h>
using namespace std;
long long int mod_pow(long long int x, int n) {
  if (n == 0) return 1;
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % 100000007;
    x = x * x % 100000007;
    n >>= 1;
  }
  return res;
}
vector<long long int> allDivisors(long long int n) {
  vector<long long int> v;
  for (long long int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        v.push_back(i);
      else {
        v.push_back(i);
        v.push_back(n / i);
      }
    }
  }
  return v;
}
void solve() {
  int n;
  int a[33] = {-5, 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};
  cin >> n;
  cout << a[n + 1] << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
