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