#include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(n);i++)
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int INF=1e9;
const int MOD=1e9+7;
const double pi=acos(-1);

int main(){
  int k;cin>>k;
  if(k==1 || k==2 || k==3||k==5||k==7||k==11||k==13||k==15||k==17||k==19||k==23||k==29||k==31)cout<<1<<endl;
  if(k==4||k==6||k==9||k==10||k==14||k==21||k==22||k==25||k==26)cout<<2<<endl;
  if(k==28||k==30)cout<<4<<endl;
  if(k==8||k==12||k==18||k==20||k==27)cout<5<<endl;
  if(k==16)cout<<14<<endl;
  if(k==24)cout<<15<<endl;
  if(k==32)cout<<51<<endl;
}
