#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s =
      "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 k;
  cin >> k;
  k--;
  if (k < 16) {
    cout << s[3 * k];
  } else if (k == 16) {
    cout << 14;
  } else if (k < 24) {
    cout << s[3 * k + 1];
  } else if (k == 24) {
    cout << 15;
  } else if (k < 32) {
    cout << s[3 * k + 2];
  } else {
    cout << 51;
  }
}
