#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch = '-') {
      w = -w;
    }
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = (((s * 10ll)) + (ch - '0'));
    ch = getchar();
  }
  return s;
}
int a[11] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2};
int b[11] = {0, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5};
int c[11] = {0, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4};
int d[3] = {0, 1, 51};
int main() {
  cout.sync_with_stdio(false);
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int n;
  n = read();
  if (n <= 10) {
    cout << a[n] << endl;
  } else if (n <= 20) {
    cout << b[n - 10] << endl;
  } else if (n <= 30) {
    cout << c[n - 20] << endl;
  } else {
    cout << c[n - 30] << endl;
  }
  return 0;
}
