#include <bits/stdc++.h>
using namespace std;
int main() {
  string PON =
      "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;
  if (k <= 16) {
    cout << PON.at((k - 1) * 3);
  }
  if ((16 <= k) && (k <= 24)) {
    cout << PON.at((k - 1) * 3 + 1);
  }
  if ((24 <= k) && (k <= 32)) {
    cout << PON.at((k - 1) * 3 + 2);
  }
  if (k == 32) {
    cout << "2";
  }
  cout << endl;
}
