#include <bits/stdc++.h>
int main() {
  int n, a[] = {0, 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};
  for (int i = 1; i < 33; i++) {
    for (int j = 0; j < 33 - i; j++) {
      if (a[j] > a[j + 1]) {
        int t = a[j + 1];
        a[j + 1] = a[j];
        a[j] = t;
      }
    }
  }
  scanf("%d", &n);
  printf("%d", a[n]);
  return 0;
}
