/* Bismillahirrahmanirrahim
   Semoga Dapet AC ya Allah
   Amin.................. :)
   Ps. SelfRemainder #1: Variabel gak otomatis nilainya 0
					 #2: Output harus sama persis formatnya sama di contoh
					 #3: Jangan lama2 mikirin 1 soal. Kalo dah gabisa, stop
					 #4: Kalau for bersarang, variabelnya jangan sama
*/
#include<bits/stdc++.h>
#define forA for(int i=0; i<a; i++)
#define Fora for(int i=1; i<=a; i++)
#define ll long long
#define F first
#define S second
using namespace std;

int main(){
	int arr[] = {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 a;
	cin >> a;
	a--;
	cout << arr[a];
}