#include <bits/stdc++.h>
using namespace std;
const int MaxDegree = 0x3f3f3f;
const double Mod = 1e9 + 7;
const double PI = acos(-1);
int book[1005][1005];
int main() {
  int T, element[45] = {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};
  while (cin >> T) {
    cout << element[T] << endl;
  }
  return 0;
}
