#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
long long POW(long long x, long long y) {
  long long ans = 1;
  long long base = x;
  while (y) {
    if (y & 1) {
      ans *= base;
    }
    base = base * base;
    y = y >> 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, i, j, k, t, temp, tc;
  long long arr[33] = {-1, 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 >> k;
  cout << arr[k] << endl;
  return 0;
}
