#include <bits/stdc++.h>
int a() {
  int n;
  std::cin >> n;
  std::vector<int> vec(32);
  vec[0] = 1;
  vec[1] = 1;
  vec[2] = 1;
  vec[3] = 2;
  vec[4] = 1;
  vec[5] = 2;
  vec[6] = 1;
  vec[7] = 5;
  vec[8] = 2;
  vec[9] = 2;
  vec[10] = 1;
  vec[11] = 5;
  vec[12] = 1;
  vec[13] = 2;
  vec[14] = 1;
  vec[15] = 14;
  vec[16] = 1;
  vec[17] = 5;
  vec[18] = 1;
  vec[19] = 5;
  vec[20] = 2;
  vec[21] = 2;
  vec[22] = 1;
  vec[23] = 15;
  vec[24] = 2;
  vec[25] = 2;
  vec[26] = 5;
  vec[27] = 4;
  vec[28] = 1;
  vec[29] = 4;
  vec[30] = 1;
  vec[21] = 51;
  std::cout << vec[n - 1];
  return 0;
}
int main(int argc, const char* argv[]) {
  a();
  return 0;
}
