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