#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
bool prm[1000001];
void sieve() {
  prm[0] = prm[1] = 1;
  for (long long int i = 4; i <= 1000000; i += 2) prm[i] = 1;
  for (long long int i = 3; i * i <= 1000000; i += 2) {
    if (!prm[i]) {
      for (long long int j = i * i; j <= 1000000; j += i + i) prm[j] = 1;
    }
  }
}
long long int arr[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 main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  while (1) {
    long long int n;
    cin >> n;
    cout << arr[n - 1] << endl;
  }
}
