//organize and stay in moment - Abhinav IIIT-A
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define f(i,x,n) for(int i=x;i<n;++i)
#define ar array
#define MAXN (int)2e5+5
#define pb push_back
int mod= 998244353;
int arr[MAXN];
int as;
void input(){
  cin>>as;
  f(i,0,as) cin>>arr[i];
}
void q1(){
  int a[]={1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
  int k; cin>>k; --k;
  cout<a[k]<<"\n";
}
void q2(){
  int h,w; cin>>h>>w;
  h*=w; ++h; h/=2;
  cout<<h<<"\n";
}
void q3(){
  int a,b; cin>>a>>b;
  for(int i=1;i<=100000;++i){
    int x=i*8; x/=100;
    int y=i*10; y/=100;
    if(x==a && y==b){
      cout<<i;
      return ;
    }
  }
  cout<<-1;
}
void q4(){
  string s; cin>>s;
  deque<int> q;
  f(i,0,s.size())
  q.push_back(s[i]);
  int Q; cin>>Q;
  int curr=0; 
  //wtf....
  while(Q--){
    int t;
    cin>>t;
    if(t==1){
      curr=1-curr;
    }else{
      int f;char c; cin>>f>>c;
      if(curr==0 && f==1)
        q.push_front(c);
      else if(curr==0 && f==2)
        q.push_back(c);
      else if(curr==1 && f==1)
        q.push_back(c);
      else q.push_front(c);
    }
    //cout<<curr<<" ";
    
  }
  string ret="";
  while(!q.empty()){
    ret+=q.front();
    q.pop_front();
  }
//  cout<<curr<<" ";
  if(curr)
     reverse(ret.begin(),ret.end());
   cout<<ret;
   return ;
}
void q5(){
  int n,p; cin>>n>>p;
  string s; cin>>s;
  int ans=0;
  if(p==2 || p==5){
    f(i,0,n)
    if((s[i]-'0')%p==0)
      ans+=i+1;
  }else {
    int tt=1;
    int curr=0;
     map<int,int> mp;
     mp[0]++;
     for(int i=n-1;i>=0;--i){
        curr+=(s[i]-'0')*tt;
        tt*=10;
        // if curr value if 0 then the above mp[0]++ hnadles it
        //if it is not then it avoides taking i with i again (you cant make i with i if it is not divisible by p)               
        ans+=mp[curr];
        ++mp[curr];
     }
  }
  cout<<ans;
}
int mod2=998244353;
void solve(){
  int n; cin>>n;
  array<int,2> ar[n];
  f(i,0,n) cin>>ar[i][0]>>ar[i][1];
  sort(ar,ar+n);
  int dp[n+1];
  dp[n]=1;
  //there are two ways activate i or do not activate it
  //if we activate it then the number of configurations is same as the highest one say j that is not effected
  // else it is i+1 since it wont be affected.
  //dp[i]=dp[i+1]+dp[j]
  stack<int> id,dis;
  id.push(n); dis.push((int)2e10);
  for(int i=n-1;i>=0;--i){
    while(dis.top()<ar[i][0]+ar[i][1]){
      dis.pop(); id.pop();
    }
    int j=id.top();
    dp[i]=dp[j];dp[i]%=mod2;
    dp[i]+=dp[i+1]; dp[i]%=mod2;
    id.push(i); dis.push(ar[i][0]);
  }
  cout<<dp[0];
  //yay!!
}
int32_t main()
{
  int t; t=1; //cin>>t;
  while(t--) q1();
  return 0;
}
