#include <bits/stdc++.h>
int dx4[] = {1, 0, -1, 0};
int dy4[] = {0, -1, 0, 1};
long long int gcd(long long int x, long long int y) {
  if (!y) return x;
  return gcd(y, x % y);
}
long long int lcm(long long int x, long long int y) {
  return x / gcd(x, y) * y;
}
void swap(long long int* x, long long int* y) {
  long long int tmp = *x;
  *x = *y;
  *y = tmp;
}
int asc_cmp(const void* X, const void* Y) {
  long long int x = *(int*)X, y = *(int*)Y;
  if (x < y)
    return -1;
  else if (x == y)
    return 0;
  else
    return 1;
}
int desc_cmp(const void* X, const void* Y) {
  long long int x = *(int*)X, y = *(int*)Y;
  if (x < y)
    return 1;
  else if (x == y)
    return 0;
  else
    return -1;
}
typedef struct pair_ {
  int x;
  int y;
} pair_t;
int main(void) {
  int a[] = {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 i;
  scanf("%d", &i);
  printf("%d\n", &a[i - 1]);
  return 0;
}
