#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  str = "111212152215121S1515221G2254141U";
  int S = 14;
  int G = 15;
  int U = 51;
  int K;
  cin >> K;
  int M = K - 1;
  cout << str.at(M) << endl;
}
