#include <bits/stdc++.h>
using namespace std;
const long long int infi = 1e9 + 7;
void printVector(vector<long long int> v) {
  for (long long int i = 0; i < (long long int)v.size(); i++)
    cout << v[i] << " ";
  cout << endl;
}
void printArray(long long int arr[], long long int n) {
  for (long long int i = 0; i < n; i++) cout << arr[i] << ' ';
  cout << endl;
}
set<pair<long long int, long long int>> primeset;
vector<long long int> prime_number;
void SieveOfEratosthenes(long long int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long int p = 2; p <= n; p++)
    if (prime[p]) primeset.insert(make_pair(p, 1));
}
long long modExp(long long base, long long power) {
  if (power == 0) {
    return 1;
  } else {
    long long cur = modExp(base, power / 2);
    cur = cur * cur;
    cur = cur % 1000000007;
    if (power % 2 == 1) cur = cur * base;
    cur = cur % 1000000007;
    return cur;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int t = 1;
  while (t--) {
    long long int arr[] = {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};
    long long int k;
    cin >> k;
    cout << arr[k - 1] << endl;
  }
  return 0;
}
