#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> vrr;
  vrr.push_back(1);
  vrr.push_back(1);
  vrr.push_back(1);
  vrr.push_back(2);
  vrr.push_back(1);
  vrr.push_back(2);
  vrr.push_back(1);
  vrr.push_back(5);
  vrr.push_back(2);
  vrr.push_back(2);
  vrr.push_back(1);
  vrr.push_back(5);
  vrr.push_back(1);
  vrr.push_back(2);
  vrr.push_back(1);
  vrr.push_back(14);
  vrr.push_back(1);
  vrr.push_back(5);
  vrr.push_back(1);
  vrr.push_back(5);
  vrr.push_back(2);
  vrr.push_back(2);
  vrr.push_back(1);
  vrr.push_back(5);
  vrr.push_back(2);
  vrr.push_back(5);
  vrr.push_back(4);
  vrr.push_back(1);
  vrr.push_back(4);
  vrr.push_back(1);
  vrr.push_back(51);
  int k;
  cin >> k;
  cout << vrr[k - 1];
  return 0;
}
