#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
int64 max(int64 a, int64 b) {
  if (b > a)
    return b;
  else
    return a;
}
int64 min(int64 a, int64 b) {
  if (b < a)
    return b;
  else
    return a;
}
signed 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";
  int64 k;
  cin >> k;
  vector<int64> nums;
  int64 mul = 1;
  int64 temp = 0;
  for (int64 i = 0; i < s.size(); i++) {
    if (s[i] >= '0' && s[i] <= '9') {
      temp += (s[i] - '0') * mul;
      mul *= 10;
    } else if (s[i] == ',') {
      nums.push_back(temp);
      mul = 1;
      temp = 0;
    }
  }
  if (temp) nums.push_back(temp);
  cout << nums[k - 1] << endl;
  return 0;
}
