#include <bits/stdc++.h>
#define MODD 1000000007LL
#define MAX_SIZE 400001
#define MAX_N 100001
using namespace std;
typedef long long ll;

ll max(ll a,ll b){return a>b?a:b;}
ll min(ll a,ll b){return a<b?a:b;}
double max(double a,double b){return a>b?a:b;}
double min(double a,double b){return a<b?a:b;}

ll modd(ll a){if(a<0LL) return a*-1LL;return a;}
double modd(double a){if(a<0.0) return a*-1.0;return a;}

ll modulo(ll a){return a % MODD; }

ll comp(ll& a, ll& b){
    return a>b;
}

ll power(ll k, ll p){
    if (p == 0)
        return 1LL;
 
    ll P = power(k, p/2LL);
    P = (P * P) % MODD;
 
    if (p % 2 == 1)
        P = (P * k) % MODD;
 
    return P;
}

ll sum(ll bit[], ll i){
    // sum of [1...i] 
    ll ans=0;
    while(i>0){
        ans+=bit[i];
        i-=i&(-i); // lowest set bit
    }
    return ans;
}

void update(ll bit[], ll n, ll i, ll delta){
    // update ith element with value of delta
    while(i<=n){
        bit[i]+=delta;
        i+=i&(-i);
    }
}

int main(){





    #ifndef ONLINE_JUDGE 

    // For getting input from input.txt file 
    freopen("input.txt", "r", stdin); 

    // Printing the Output to output.txt file 
    freopen("output.txt", "w", stdout); 
    #endif 




    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    ll n=32;
    ll arr[n]={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};
    // for(ll i=0;i<n;i++){
    //     cin>>arr[i];
    // }
    ll k;
    cin>>k;

    cout<<arr[k-1]<<endl;

    return 0;
}