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