#include <bits/stdc++.h>
using namespace std;
int main() {
  int K;
  cin >> K;
  if (K == 0) cout << 1 << endl;
  if (K == 1) cout << 1 << endl;
  if (K == 2) cout << 1 << endl;
  if (K == 3) cout << 2 << endl;
  if (K == 4) cout << 1 << endl;
  if (K == 5) cout << 2 << endl;
  if (K == 6) cout << 1 << endl;
  if (K == 7) cout << 5 << endl;
  if (K == 8) cout << 2 << endl;
  if (K == 9) cout << 2 << endl;
  if (K == 10) cout << 1 << endl;
  if (K == 11) cout << 5 << endl;
  if (K == 12) cout << 1 << endl;
  if (K == 13) cout << 2 << endl;
  if (K == 14) cout << 1 << endl;
  if (K == 15) cout << 14 << endl;
  if (K == 16) cout << 1 << endl;
  if (K == 17) cout << 5 << endl;
  if (K == 18) cout << 1 << endl;
  if (K == 19) cout << 5 << endl;
  if (K == 20) cout << 2 << endl;
  if (K == 21) cout << 2 << endl;
  if (K == 22) cout << 1 << endl;
  if (K == 23) cout << 15 << endl;
  if (K == 24) cout << 2 << endl;
  if (K == 25) cout << 2 << endl;
  if (K == 26) cout << 5 << endl;
  if (K == 27) cout << 4 << endl;
  if (K == 28) cout << 1 << endl;
  if (K == 29) cout << 4 << endl;
  if (K == 30) cout << 1 << endl;
  if (K == 31) cout << 51 << endl;
}
