#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int k;
  cin >> k;
  string s;
  int count = 0;
  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";
  vector<int> vec;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == ',') {
      int j = i - 1;
      int count = 1;
      if (s[j] != ',') {
        vec.push_back((s[j] - '0') * count);
        j--;
        count *= 10;
      }
    }
  }
  cout << vec[k - 1] << endl;
}
