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