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