import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main extends PrintWriter {
    BufferedReader in;
    StringTokenizer stok;
    final Random rand = new Random(31);
    final int inf = (int) 1e9;
    final long linf = (long) 1e18;

    public void solve() throws IOException {
        int[] a = new int[] {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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
        println(a[nextInt() - 1]);
    }

    public void run() {
        try {
            solve();
            close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(abs(-1));
        }
    }

    Main() throws IOException {
        super(System.out);
        in = new BufferedReader(new InputStreamReader(System.in));
    }

    Main(String s) throws IOException {
        super("".equals(s) ? "output.txt" : (s + ".out"));
        in = new BufferedReader(new FileReader("".equals(s) ? "input.txt" : (s + ".in")));
    }

    public static void main(String[] args) throws IOException {
        try {
            Locale.setDefault(Locale.US);
        } catch (Exception ignored) {
        }
        new Main().run();
    }

    String next() throws IOException {
        while (stok == null || !stok.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null) {
                return null;
            }
            stok = new StringTokenizer(s);
        }
        return stok.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    int[] nextIntArray(int len) throws IOException {
        int[] a = new int[len];
        for (int i = 0; i < len; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    void shuffle(int[] a) {
        for (int i = 1; i < a.length; i++) {
            int x = rand.nextInt(i + 1);
            int t = a[i];
            a[i] = a[x];
            a[x] = t;
        }
    }

    boolean nextPerm(int[] p) {
        for (int a = p.length - 2; a >= 0; --a)
            if (p[a] < p[a + 1])
                for (int b = p.length - 1; ; --b)
                    if (p[b] > p[a]) {
                        int t = p[a];
                        p[a] = p[b];
                        p[b] = t;
                        for (++a, b = p.length - 1; a < b; ++a, --b) {
                            t = p[a];
                            p[a] = p[b];
                            p[b] = t;
                        }
                        return true;
                    }
        return false;
    }

    <T> List<T>[] createAdjacencyList(int countVertex) {
        List<T>[] res = new List[countVertex];
        for (int i = 0; i < countVertex; i++) {
            res[i] = new ArrayList<T>();
        }
        return res;
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;

public class Task409F {

    public static void main(String... args) throws NumberFormatException,
            IOException {
        Solution.main(System.in, System.out);
    }

    static class Scanner {

        private final BufferedReader br;
        private String[] cache;
        private int cacheIndex;

        Scanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
            cache = new String[0];
            cacheIndex = 0;
        }

        int nextInt() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Integer.parseInt(cache[cacheIndex++]);
        }

        int nextInt(int radix) throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Integer.parseInt(cache[cacheIndex++], radix);
        }

        long nextLong() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Long.parseLong(cache[cacheIndex++]);
        }

        double nextDouble() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Double.parseDouble(cache[cacheIndex++]);
        }

        String next() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return cache[cacheIndex++];
        }

        void close() throws IOException {
            br.close();
        }

    }

    static class Solution {

        public static void main(InputStream is, OutputStream os)
                throws NumberFormatException, IOException {
            PrintWriter pw = new PrintWriter(os);
            Scanner sc = new Scanner(is);

            long[] retVal = {
                    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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2,
                    2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};

            pw.println(retVal[sc.nextInt() - 1]);

            pw.flush();
            sc.close();
        }
    }

}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int N = sc.nextInt();
		int[] array = new int[]{	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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2 };
		System.out.println(array[N-1]);

		out.close();
	}

	static class Vector implements Comparable<Vector> {
		double x, y;

		public Vector(double _x, double _y) {
			x = _x;
			y = _y;
		}

		public Vector sub(Vector p) {
			return new Vector(x - p.x, y - p.y);
		}

		public Vector add(Vector p) {
			return new Vector(x + p.x, y + p.y);
		}

		public Vector scale(double s) {
			return new Vector(x * s, y * s);
		}

		public Vector rot(double t) { // Rotate t radians counter-clockwise
			double c = Math.cos(t);
			double s = Math.sin(t);
			return new Vector(x * c - y * s, x * s + y * c);
		}

		public Vector orthoCCW() { // Rotate 90 degrees counter-clockwise
			return new Vector(-y, x);
		}

		public Vector norm() { // Return a vector with same angle and magnitude
								// 1
			return new Vector(x / mag(), y / mag());
		}

		public Vector project(Vector p) { // Return projection of this onto p
			return p.scale(dot(p) / p.dot(p));
		}

		public double dot(Vector p) {
			return x * p.x + y * p.y;
		}

		public double cross(Vector p) {
			return x * p.y - y * p.x;
		}

		public double mag() {
			return Math.sqrt(x * x + y * y);
		}

		public double mag2() {
			return x * x + y * y;
		}

		public double dis(Vector p) {
			return sub(p).mag();
		}

		public double ang() {
			return (Math.atan2(y, x) + 2 * Math.PI) % (2 * Math.PI);
		}

		public double angBetween(Vector p) { // Returns inner angle between two
												// vectors
			double d = Math.abs(ang() - p.ang());
			return Math.min(d, 2 * Math.PI - d);
		}

		public int compareTo(Vector p) {
			if (p.x == x)
				return (int) Math.signum(y - p.y);
			return (int) Math.signum(x - p.x);
		}

		public String toString() {
			return String.format("(%.3f, %.3f)", x, y);
		}
	}

	static class FasterScanner{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public FasterScanner(){
			stream = System.in;
			//stream = new FileInputStream(new File("dec.in"));

		}
		int read(){
			if(numChars==-1)
				throw new InputMismatchException();
			if(curChar>=numChars){
				curChar = 0;
				try{
					numChars = stream.read(buf);
				} catch (IOException e){
					throw new InputMismatchException();
				}
				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		boolean isSpaceChar(int c){
			return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
		}
		boolean isEndline(int c){
			return c=='\n'||c=='\r'||c==-1;
		}
		int nextInt(){
			return Integer.parseInt(next());
		}
		long nextLong(){
			return Long.parseLong(next());
		}
		double nextDouble(){
			return Double.parseDouble(next());
		}
		String next(){
			int c = read();
			while(isSpaceChar(c))
				c=read();
			StringBuilder res = new StringBuilder();
			do{
				res.appendCodePoint(c);
				c=read();
			} while(!isSpaceChar(c));
			return res.toString();
		}
		String nextLine(){
			int c = read();
			while(isEndline(c))
				c=read();
			StringBuilder res = new StringBuilder();
			do{
				res.appendCodePoint(c);
				c = read();
			}while(!isEndline(c));
			return res.toString();
		}

	}

}

import java.awt.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Map.Entry;

import static java.lang.Math.*;

public class Solution implements Runnable {
        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
        BufferedReader in;
        PrintWriter out;
        StringTokenizer tok = new StringTokenizer("");
        String delim = "";

        String readString() throws IOException {
            try {
                while(!tok.hasMoreTokens()) {
                    tok = new StringTokenizer(in.readLine());
                }
                return tok.nextToken();
            }
            catch (Exception e){
                return null;
            }
        }

        int readInt() throws IOException{
            return Integer.parseInt(readString());
        }
        long readLong() throws IOException{
            return Long.parseLong(readString());
        }
        double readDouble() throws IOException{
            return Double.parseDouble(readString());
        }
        Point readPoint() throws IOException {
            return new Point(readInt(), readInt());
        }
//----------------------------------

        public class Pair<T1,T2> {
            public T1 x1;
            public T2 x2;
            public Pair(){};
            public Pair(T1 x1, T2 x2){
                this.x1 = x1;
                this.x2 = x2;
            }
            public String toString(){
                return x1 + ":" + x2;
            }
        }

        public class Three {
            public int x, y, z;
            public Three(){}
            public Three(int a, int b, int c){x = a;y=b;z=c;}
            public String toString(){
                return x + ":" + y + ":" + z;
            }
        }

//----------------------------------------

        void solve() throws NumberFormatException, IOException {
            TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
            map.put(1, 1);
            map.put(2, 1);
            map.put(3, 1);
            map.put(4, 2);
            map.put(5, 1);
            map.put(6, 2);
            map.put(7, 1);
            map.put(8, 5);
            map.put(9, 2);
            map.put(10, 2);
            map.put(11, 1);
            map.put(12, 5);
            map.put(13, 1);
            map.put(14, 2);
            map.put(15, 1);
            map.put(16, 14);
            map.put(17, 1);
            map.put(18, 5);
            map.put(19, 1);
            map.put(20, 5);
            map.put(21, 2);
            map.put(22, 2);
            map.put(23, 1);
            map.put(24, 15);
            map.put(25, 2);
            map.put(26, 2);
            map.put(27, 5);
            map.put(28, 4);
            map.put(29, 1);
            map.put(30, 4);
            map.put(31, 1);
            map.put(32, 51);
            map.put(33, 1);
            map.put(34, 2);
            map.put(35, 1);
            map.put(36, 14);
            map.put(37, 1);
            map.put(38, 2);
            map.put(39, 2);
            map.put(40, 14);
            map.put(41, 1);
            map.put(42, 6);
            map.put(43, 1);
            map.put(44, 4);
            map.put(45, 2);
            map.put(46, 2);
            map.put(47, 1);
            map.put(48, 52);
            map.put(49, 2);
            map.put(50, 5);
            map.put(51, 1);
            map.put(52, 5);
            map.put(53, 1);
            map.put(54, 15);
            map.put(55, 2);
            map.put(56, 13);
            map.put(57, 2);
            map.put(58, 2);
            map.put(59, 1);
            map.put(60, 13);
            map.put(61, 1);
            map.put(62, 2);
            map.put(63, 4);
            map.put(64, 267);

            out.println(map.get(readInt()));
        }

//----------------------------------------
        public static void main(String[] args){
            new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
        }

        public void run(){
                try{
                        timeBegin = System.currentTimeMillis();

                        try{
                            if (ONLINE_JUDGE){
                                in = new BufferedReader(new InputStreamReader(System.in));
                                out = new PrintWriter(System.out);
                            }
                            else {
                                in = new BufferedReader(new FileReader("input.txt"));
                                out = new PrintWriter("output.txt");
                            }
                        }catch(Throwable e){
                            in = new BufferedReader(new InputStreamReader(System.in));
                            out = new PrintWriter(System.out);
                        }
                        solve();
                        out.close();

                        timeEnd = System.currentTimeMillis();
                        if (!ONLINE_JUDGE) System.err.println("Time = " + (timeEnd - timeBegin));
                }catch (Exception e){
                        e.printStackTrace(System.err);
                        System.exit(-1);
                }
        }

        long timeBegin, timeEnd;
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class F {

	public static void main(String[] args) throws IOException {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int[] a = {	0, 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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
		out.println(a[scan.nextInt()]);
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			try {line = br.readLine();}
			catch (Exception e) {e.printStackTrace();}
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        new Main().run();}

    int n;
    int v[][];
    int lisan(int[][] arr,int idx){
        for(int i=0;i<n;++i){
            v[i][0] = arr[i][idx];
            v[i][1] = i;
        }
        Arrays.sort(v, new Comparator<int[]>() {
            @Override
            public int compare(int[] x, int[] y) {
                return x[0]-y[0];
            }
        });
        int tot = -1;
        for (int i = 0; i < n; ++i) {
            if(i==0||v[i][0]!=v[i-1][0]) tot++;
            arr[v[i][1]][idx] = tot;
        }
        // id range from 0 to tot
        return tot+1;
    }

    long inv(long a, long MOD) {
        //return fpow(a, MOD-2, MOD);
        return a==1?1:(long )(MOD-MOD/a)*inv(MOD%a, MOD)%MOD;
    }

    // 计算某个特别大的组合数
    long C(long n,long m, long MOD) {
        if(m+m>n)m=n-m;
        long up=1,down=1;
        for(long i=0;i<m;i++)
        {
            up=up*(n-i)%MOD;
            down=down*(i+1)%MOD;
        }
        return up*inv(down, MOD)%MOD;
    }

    long[][] mult(long a[][],long b[][], long mod){
        int l1 = a.length;
        int l2 = b.length;
        int l3 = b[0].length;
        long r[][] = new long[l1][l3];
        for(int i=0;i<l1;++i){
            for(int j=0;j<l2;++j){
                for(int k=0;k<l3;++k){
                    r[i][k] = (r[i][k] + a[i][j] * b[j][k])%mod;
                }
            }
        }
        return r;
    }

    long[][] ones(int len){
        long r[][] = new long[len][len];
        for(int i=0;i<len;++i){
            r[i][i] = 1L;
        }
        return r;
    }

    long[][] quick(long a[][], long times,long mod){
        int len = a.length;
        long ans[][] = ones(len);

        while(times>0){
            if((times&1)==1) {
                ans = mult(ans, a, mod);
            }
            a = mult(a, a, mod);
            times >>= 1;
        }

        return ans;
    }

    int sg(int x,int y){

        int v = (x-1)|(y-1);

        for(int i=0;;i++){
            if((v&(1<<i))==0){
                return i;
            }
        }

    }
    int[] h,ne,to;
    int ct = 0;

    void graph(int n,int m){
        h = new int[n];
        Arrays.fill(h,-1);
        ne = new int[m];
        to = new int[m];
        ct = 0;
        dfn = new int[n];
        low = new int[n];
        time = 0;top =0;dcc_cnt = 0;
        sccno  =new int[n];

        root= 0;
        stack = new int[n];

    }
    void add(int u,int v){
        to[ct] = v;
        ne[ct] = h[u];
        h[u] = ct++;
    }

    int color[],dfn[],low[],stack[],cnt[];
    int sccno[];

    boolean iscut[];
    int time = 0,top = 0;
    int scc_cnt;
    int  dcc_cnt;
    List<Integer> dcc[];
    int root = 0;

    //  无向图的强连通分量
    void tarjanNonDirect(int u) {
        low[u] = dfn[u]= ++time;
        stack[top++] = u;
        int child = 0;
        for(int i=h[u];i!=-1;i=ne[i]) {
            int v = to[i];
            if(dfn[v]==0) {
                tarjanNonDirect(v);
                low[u]=Math.min(low[u],low[v]);
                if(low[v]>=dfn[u]){
                    if(u!=root||++child>1){     // 不是root，直接记为cut，是root，判断是否有两个儿子
                        iscut[u] = true;
                    }
                    ++dcc_cnt;
                    // 一个割点可能会被多个点双共享
                    int z = -1;
                    do {
                        z = stack[--top];
                        dcc[dcc_cnt].add(z);
                    } while(z != v);
                    dcc[dcc_cnt].add(u);
                }
            } else {
                low[u]=Math.min(low[u],low[v]);
            }
        }
    }

    // 有向图的强连通分量
    void tarjan(int u) {
        low[u] = dfn[u]= ++time;
        stack[top++] = u;
        for(int i=h[u];i!=-1;i=ne[i]) {
            int v = to[i];
            if(dfn[v]==0) {
                tarjan(v);
                low[u]=Math.min(low[u],low[v]);
            } else if(sccno[v]==0) {
                // dfn>0 but sccno==0, means it's in current stack
                low[u]=Math.min(low[u],low[v]);
            }
        }

        if(dfn[u]==low[u]) {
            sccno[u] = ++scc_cnt;
            while(stack[top-1]!=u) {
                sccno[stack[top-1]] = scc_cnt;
                --top;
            }
            --top;
        }
    }

    void solve() {
//        int c = ni();
//        for(int i=0;i<c;++i){
//            int n  = ni();
//            int []b = new int[n+10];
//            int []r = new int[n+10];
//
//            for(int j=1;j<=n;++j){
//                b[j] = ni();
//                r[j] = ni();
//            }
//
//            int dp[][][] = new int[n+10][1<<8][16];
//
//            for(int j=0;j<=n;++j){
//                for(int st=0;st<1<<8;++st) {
//                    for (int k = -8; k <= 7; ++k) {
//                        dp[j][st][k+8] = 1000000000;
//                    }
//                }
//            }
//            dp[1][0][7] = 0;
//            for(int j=1;j<=n;++j){
//                for(int st=0;st<1<<8;++st){
//                    for(int k=Math.max(-j,-8);k<=7&&j+k<=n;++k){
//
//                        int kk = k+8;
//                        if(dp[j][st][kk]==1000000000) continue;
//                        if((st&1)>0){
//                            if(j+1<=n&&kk-1>=0) {
//                                dp[j + 1][st >> 1][kk - 1] = Math.min(dp[j + 1][st >> 1][kk - 1], dp[j][st][kk]);
//                            }
//                        }else{
//                            int cnt = 0;
////                            for(int l=7;l>=0;--l) {
////                                if(j+l>n) continue;
////                                if((st&(1<<l))==0){
////                                    boolean ok = true;
////                                    int add = 0;
////                                    for(int g=l-1;g>=0;--g){
////                                        if(r[j+g]<cnt+add+1){
////                                            ok = false;break;
////                                        }
////                                        if((st&(1<<g))>0){
////                                            add++;
////                                        }
////                                    }
////                                    if(ok) {
////                                        dp[j][st|(1<<l)][l+8] = Math.min(dp[j][st][kk] + time(j+k,j+l, b), dp[j][st|(1<<l)][l+8]);
////                                    }
////                                }else{
////                                    cnt++;
////                                }
////                            }
//
//                            int lim=1000000000;
//                            for (int l=0;l<=7;l++)
//                            {
//                                if(j+l>n) continue;
//                                if ((st&(1<<l))==0)
//                                {
//                                    if (j+l>lim)
//                                        break;
//                                    lim=Math.min(lim,j+l+b[j+l]);
//                                    dp[j][st|(1<<l)][l+8] = Math.min(dp[j][st][kk] + time(j+k,j+l, b), dp[j][st|(1<<l)][l+8]);
//                                }
//                            }
//                        }
//                    }
//                }
//            }
//            int an = 1000000000;
//                for (int k = -8; k <= 0; ++k) {
//                    an = Math.min(an, dp[n][1][k + 8]);
//                }
//
//            println(an);
//
//
//        }

        int a[] ={0, 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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};

        int r = ni();
        print(a[r]);

//        for(int i=500;i>=100;--i){
//            if(good(i)!=bad(i)){
//                println(good(i));
//                println(bad(i));
//                println(i);
//                println("-----------------------");
//            }
//        }

        //N , M , K , a , b , c , d . 其中N , M是矩阵的行列数；K 是上锁的房间数目，(a, b)是起始位置，(c, d)是出口位置

//        int n = ni();
//        int m = ni();
//        int k = ni();
//        int a = ni();
//        int b = ni();
//        int c = ni();
//        int d = ni();
//
//
//        char cc[][] = nm(n,m);
//        char keys[][] = new char[n][m];
//
//        char ky = 'a';
//        for(int i=0;i<k;++i){
//            int x = ni();
//            int y = ni();
//            keys[x][y] = ky;
//            ky++;
//        }
//        int f1[] = {a,b,0};
//
//        int dd[][] = {{0,1},{0,-1},{1,0},{-1,0}};
//
//        Queue<int[]> q =  new LinkedList<>();
//        q.offer(f1);
//        int ts = 1;
//
//        boolean vis[][][] = new boolean[n][m][33];
//
//        while(q.size()>0){
//            int sz = q.size();
//            while(sz-->0) {
//                int cur[] = q.poll();
//                vis[cur[0]][cur[1]][cur[2]] = true;
//
//                int x = cur[0];
//                int y = cur[1];
//
//                for (int u[] : dd) {
//                       int lx = x +  u[0];
//                       int ly = y +  u[1];
//                       if (lx >= 0 && ly >= 0 && lx < n && ly < m && (cc[lx][ly] != '#')&&!vis[lx][ly][cur[2]]){
//                            char ck =cc[lx][ly];
//                            if(ck=='.'){
//                                if(lx==c&&ly==d){
//                                    println(ts); return;
//                                }
//                                if(keys[lx][ly]>='a'&&keys[lx][ly]<='z') {
//                                    int cao = cur[2] | (1 << (keys[lx][ly] - 'a'));
//                                    q.offer(new int[]{lx, ly, cao});
//                                    vis[lx][ly][cao] = true;
//                                }else {
//
//                                    q.offer(new int[]{lx, ly, cur[2]});
//                                }
//
//                            }else if(ck>='A'&&ck<='Z'){
//                                int g = 1<<(ck-'A');
//                                if((g&cur[2])>0){
//                                    if(lx==c&&ly==d){
//                                        println(ts); return;
//                                    }
//                                    if(keys[lx][ly]>='a'&&keys[lx][ly]<='z') {
//
//                                        int cao = cur[2] | (1 << (keys[lx][ly] - 'a'));
//                                        q.offer(new int[]{lx, ly, cao});
//                                        vis[lx][ly][cao] = true;;
//                                    }else {
//
//                                        q.offer(new int[]{lx, ly, cur[2]});
//                                    }
//                                }
//                            }
//                       }
//                }
//
//                }
//            ts++;
//        }
//        println(-1);

//        int n = ni();
//
//        HashSet<String> st = new HashSet<>();
//        HashMap<String,Integer> mp = new HashMap<>();
//
//
//        for(int i=0;i<n;++i){
//            String s  = ns();
//            int id= 1;
//            if(mp.containsKey(s)){
//                int u = mp.get(s);
//                id = u;
//
//            }
//
//            if(st.contains(s)) {
//
//                while (true) {
//                    String ts = s + id;
//                    if (!st.contains(ts)) {
//                        s = ts;
//                        break;
//                    }
//                    id++;
//                }
//                mp.put(s,id+1);
//            }else{
//                mp.put(s,1);
//            }
//            println(s);
//            st.add(s);
//
//        }

//        int t = ni();
//
//        for(int i=0;i<t;++i){
//            int n = ni();
//            long w[] = nal(n);
//
//            Map<Long,Long> mp = new HashMap<>();
//            PriorityQueue<long[]> q =new PriorityQueue<>((xx,xy)->{return Long.compare(xx[0],xy[0]);});
//
//            for(int j=0;j<n;++j){
//                q.offer(new long[]{w[j],0});
//                mp.put(w[j],mp.getOrDefault(w[j],0L)+1L);
//            }
//
//            while(q.size()>=2){
//                long f[] = q.poll();
//                long y1 = f[1];
//                if(y1==0){
//                    y1 = mp.get(f[0]);
//                    if(y1==1){
//                        mp.remove(f[0]);
//                    }else{
//                        mp.put(f[0],y1-1);
//                    }
//                }
//                long g[] = q.poll();
//                long y2 = g[1];
//                if(y2==0){
//                    y2 = mp.get(g[0]);
//                    if(y2==1){
//                        mp.remove(g[0]);
//                    }else{
//                        mp.put(g[0],y2-1);
//                    }
//                }
//                q.offer(new long[]{f[0]+g[0],2L*y1*y2});
//
//            }
//            long r[] = q.poll();
//            println(r[1]);
//
//
//
//
//        }
        //  int o= 9*8*7*6;
        //  println(o);

//       int t = ni();
//       for(int i=0;i<t;++i){
//           long a = nl();
//           int k  = ni();
//           if(k==1){
//               println(a);
//               continue;
//           }
//
//           int f = (int)(a%10L);
//           int s = 1;
//           int j = 0;
//           for(;j<30;j+=2){
//               int u = f-j;
//               if(u<0){
//                   u = 10+u;
//               }
//               s = u*s;
//               s = s%10;
//               if(s==k){
//                   break;
//               }
//           }
//
//           if(s==k) {
//               println(a - j - 2);
//           }else{
//               println(-1);
//           }
//
//
//
//
//       }

//     int m = ni();
//     h = new int[n];
//     to = new int[2*(n-1)];
//     ne = new int[2*(n-1)];
//     wt = new int[2*(n-1)];
//
//     for(int i=0;i<n-1;++i){
//         int u = ni()-1;
//         int v = ni()-1;
//
//     }
        //  long a[] = nal(n);

//        int n = ni();
//        int k = ni();
//        t1 = new long[200002];
//
//        int p[][] = new int[n][3];
//
//        for(int i=0;i<n;++i){
//            p[i][0]  = ni();
//            p[i][1]  = ni();
//            p[i][2]  = i+1;
//        }
//        Arrays.sort(p, new Comparator<int[]>() {
//            @Override
//            public int compare(int[] x, int[] y) {
//                if(x[1]!=y[1]){
//                    return Integer.compare(x[1],y[1]);
//                }
//                return Integer.compare(y[0], x[0]);
//            }
//        });
//
//        for(int i=0;i<n;++i){
//            int ck = p[i][0];
//
//        }

    }

//    int []h,to,ne,wt;

    //    long t2[];
    void update(long[] t,int i,long v){
        for(;i<t.length;i+=(i&-i)){
            t[i] += v;
        }
    }
    long get(long[] t,int i){
        long s = 0;
        for(;i>0;i-=(i&-i)){
            s += t[i];

        }
        return s;
    }

    int equal_bigger(long t[],long v){
        int s=0,p=0;
        for(int i=Integer.numberOfTrailingZeros(Integer.highestOneBit(t.length));i>=0;--i) {
            if(p+(1<<i)< t.length && s + t[p+(1<<i)] < v){
                v -= t[p+(1<<i)];
                p |= 1<<i;
            }
        }
        return p+1;
    }

    static class S{
        int l = 0;
        int r = 0 ;
        long tot = 0;
        long plus = 0;
        long multi = 1;

        public S(int l,int r) {
            this.l = l;
            this.r = r;
        }
    }

    static S a[];
    static long[] o;

    static void init(long[] f){
        o = f;
        int len = o.length;
        a = new S[len*4];
        build(1,0,len-1);
    }

    static void build(int num,int l,int r){
        S cur = new S(l,r);
        if(l==r){
            a[num] = cur;
            a[num].tot = o[l];
            //  a[num].tot %= p;
            return;
        }else{
            int m = (l+r)>>1;
            int le = num<<1;
            int ri = le|1;
            build(le, l,m);
            build(ri, m+1,r);
            a[num] = cur;
            pushup(num,le,ri);
        }
    }

    static long query(int num,int l,int r){
        if(a[num].l>=l&&a[num].r<=r){
            //   a[num].tot %= p;
            return a[num].tot;
        }else{
            int m = (a[num].l+a[num].r)>>1;
            int le = num<<1;
            int ri = le|1;
            //   pushdown(num, le, ri);
            long res = Long.MIN_VALUE;
            if(l<=m) {
                res = Math.max(res, query(le, l, r));
            }
            if(r>m){
                res = Math.max(res, query(ri, l, r));
            }
            //  pushup(num,le,ri);
            return res;
        }
    }

    static void update(int num,int l,long v){
        if(a[num].l == a[num].r){
            a[num].tot  = v;
        }else{
            int m = (a[num].l+a[num].r)>>1;
            int le = num<<1;
            int ri = le|1;
            // pushdown(num, le, ri);
            if(l<=m){
                update(le, l, v);
            }
            if(l>m){
                update(ri, l, v);
            }
            pushup(num,le,ri);
        }
    }

    static long p;
    static void update1(int num,int l,int r,long v){
        if(a[num].l>=l && a[num].r<=r){
            a[num].tot += v*(a[num].r-a[num].l+1);
            a[num].tot %= p;
            a[num].plus += v;
            a[num].plus %= p;
        }else{
            int m = (a[num].l+a[num].r)>>1;
            int le = num<<1;
            int ri = le|1;
            pushdown(num, le, ri);
            if(l<=m){
                update1(le, l, r, v);
            }
            if(r>m){
                update1(ri, l, r, v);
            }
            pushup(num,le,ri);
        }
    }

    static void update2(int num,int l,int r,long v){
        if(a[num].l>=l && a[num].r<=r){
            a[num].tot *= v;
            a[num].tot %= p;
            a[num].plus *= v;
            a[num].plus %= p;
            a[num].multi *= v;
            a[num].multi %= p;
        }else{
            int m = (a[num].l+a[num].r)>>1;
            int le = num<<1;
            int ri = le|1;
            pushdown(num, le, ri);
            if(l<=m){
                update2(le, l, r, v);
            }
            if(r>m){
                update2(ri, l, r, v);
            }
            pushup(num,le,ri);
        }
    }

    static void pushup(int num,int le,int ri){
        a[num].tot = Math.max(a[le].tot , a[ri].tot);
    }

    static void pushdown(int num,int le,int ri){
        if(a[num].multi!=1) {
            a[le].tot *= a[num].multi;
            a[le].tot %= p;
            a[ri].tot *= a[num].multi;
            a[ri].tot %= p;
            a[le].multi *= a[num].multi;
            a[ri].multi *= a[num].multi;
            a[le].multi %= p;
            a[ri].multi %= p;
            a[le].plus *= a[num].multi;
            a[ri].plus *= a[num].multi;
            a[le].plus %= p;
            a[ri].plus %= p;
            a[num].multi = 1;
        }
        if(a[num].plus!=0) {
            a[le].tot += (a[le].r-a[le].l+1)*a[num].plus;
            a[ri].tot += (a[ri].r-a[ri].l+1)*a[num].plus;
            a[le].tot %= p;
            a[ri].tot %= p;
            a[le].plus += a[num].plus;
            a[ri].plus += a[num].plus;
            a[le].plus %= p;
            a[ri].plus %= p;
            a[num].plus = 0;
        }
    }

    long gcd(long a,long b){ return b==0?a: gcd(b,a%b);}
    int gcd(int a,int b){ return b==0?a: gcd(b,a%b);}
    InputStream is;PrintWriter out;
    void run() throws Exception {is = System.in;
        // is  = new FileInputStream("C:\\Users\\Luqi\\Downloads\\P1273_2.in");
        out = new PrintWriter(System.out);solve();out.flush();}
    private byte[] inbuf = new byte[2];
    public int lenbuf = 0, ptrbuf = 0;
    private int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {lenbuf = is.read(inbuf);} catch (IOException e) {throw new InputMismatchException();}
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];}
    private boolean isSpaceChar(int c) {return !(c >= 33 && c <= 126);}
    private int skip() {int b;while((b = readByte()) != -1 && isSpaceChar(b));return b;}
    private double nd() {return Double.parseDouble(ns());}
    private char nc() {return (char) skip();}
    private char ncc() {int b;while((b = readByte()) != -1 && !(b >= 32 && b <= 126));return (char)b;}
    private String ns() {int b = skip();StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);b = readByte(); }
        return sb.toString();}
    private char[] ns(int n) {char[] buf = new char[n];int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) { buf[p++] = (char) b;b = readByte(); }
        return n == p ? buf : Arrays.copyOf(buf, p);}
    private String nline() {int b = skip();StringBuilder sb = new StringBuilder();
        while (!isSpaceChar(b) || b == ' ') { sb.appendCodePoint(b);b = readByte(); }
        return sb.toString();}
    private char[][] nm(int n, int m) {char[][] a = new char[n][];for (int i = 0; i < n; i++) a[i] = ns(m);return a;}
    private int[] na(int n) {int[] a = new int[n];for (int i = 0; i < n; i++) a[i] = ni();return a;}
    private long[] nal(int n) { long[] a = new long[n];for (int i = 0; i < n; i++) a[i] = nl();return a;}
    private int ni() { int num = 0, b; boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')){};
        if (b == '-') { minus = true; b = readByte(); }
        while (true) {
            if (b >= '0' && b <= '9') num = (num << 3) + (num << 1) + (b - '0');
            else return minus ? -num : num;
            b = readByte();}}
    private long nl() { long num = 0; int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')){};
        if (b == '-') { minus = true; b = readByte(); }
        while (true) {
            if (b >= '0' && b <= '9')  num = num * 10 + (b - '0');
            else return minus ? -num : num;
            b = readByte();}}
    void print(Object obj){out.print(obj);}
    void println(Object obj){out.println(obj);}
    void println(){out.println();}
}

import java.math.BigInteger;
import java.io.BufferedWriter;
import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;

// yeah another submission for this problem
public class Main {

  private void solve() throws Exception {

    int groupsOfOrderN[] = { 0, 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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2 };
    Scanner sc = new Scanner(System.in);
    System.out.println(groupsOfOrderN[sc.nextInt()]);

  }

  public static void main(String... args) {

    try {
      new Main().solve();
    } catch (Exception e) {
      e.printStackTrace();
    }

  }
}

/*
Solution: Apparently this is a squence on an online sequence website. Wow... that's unique.
*/

import java.util.*;
import java.io.*;

public class mystery000001 {
    int N;
    int[] seq = {0, 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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};

    mystery000001(BufferedReader in, PrintWriter out) throws IOException {
        StringTokenizer st = new StringTokenizer(in.readLine());
        N = Integer.parseInt(st.nextToken());
        out.println(seq[N]);
    }

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        new mystery000001(in, out);
        in.close();
        out.close();
    }
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.*;

/**
 *
 * @author Vincent
 */
public class troll {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = {0, 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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
        System.out.println(arr[sc.nextInt()]);
    }
}

import java.awt.Point;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class Main {

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	void init() throws FileNotFoundException {
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}

	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	long readLong() throws IOException {
		return Long.parseLong(readString());
	}

	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}

	public static void main(String[] args) {
		new Main().run();
		// Sworn to fight and die
	}

	public static void mergeSort(int[] a) {
		mergeSort(a, 0, a.length - 1);
	}

	private static void mergeSort(int[] a, int levtIndex, int rightIndex) {
		final int MAGIC_VALUE = 50;
		if (levtIndex < rightIndex) {
			if (rightIndex - levtIndex <= MAGIC_VALUE) {
				insertionSort(a, levtIndex, rightIndex);
			} else {
				int middleIndex = (levtIndex + rightIndex) / 2;
				mergeSort(a, levtIndex, middleIndex);
				mergeSort(a, middleIndex + 1, rightIndex);
				merge(a, levtIndex, middleIndex, rightIndex);
			}
		}
	}

	private static void merge(int[] a, int levtIndex, int middleIndex,
			int rightIndex) {
		int length1 = middleIndex - levtIndex + 1;
		int length2 = rightIndex - middleIndex;
		int[] levtArray = new int[length1];
		int[] rightArray = new int[length2];
		System.arraycopy(a, levtIndex, levtArray, 0, length1);
		System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
		for (int k = levtIndex, i = 0, j = 0; k <= rightIndex; k++) {
			if (i == length1) {
				a[k] = rightArray[j++];
			} else if (j == length2) {
				a[k] = levtArray[i++];
			} else {
				a[k] = levtArray[i] <= rightArray[j] ? levtArray[i++]
						: rightArray[j++];
			}
		}
	}

	private static void insertionSort(int[] a, int levtIndex, int rightIndex) {
		for (int i = levtIndex + 1; i <= rightIndex; i++) {
			int current = a[i];
			int j = i - 1;
			while (j >= levtIndex && a[j] > current) {
				a[j + 1] = a[j];
				j--;
			}
			a[j + 1] = current;
		}
	}

	public void run() {
		try {
			long t1 = System.currentTimeMillis();
			init();
			solve();
			out.close();
			long t2 = System.currentTimeMillis();
			System.err.println("Time = " + (t2 - t1));
		} catch (Exception e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	class LOL implements Comparable<LOL> {
		int k;
		int r;

		@Override
		public int compareTo(LOL o) {

			return r - o.r; // ---->
			// return o.x - x; // <----
			// return o.y-y;
		}

		public LOL(int xx, int yy, int kk) {
			this.r = xx * xx + yy * yy;
			this.k = kk;
		}

	}

	public long gcd(long a, long b) {
		if (a % b == 0)
			return b;
		else
			return gcd(b, a % b);
	}

	public int gcd(int a, int b) {
		if (a % b == 0)
			return b;
		else
			return gcd(b, a % b);
	}

	public void solve() throws IOException {

			int n = readInt();
			int[] a = new int[65];

			a[1] = 1;
			a[2] = 1;
			a[3] = 1;
			a[4] = 2;
			a[5] = 1;
			a[6] = 2;
			a[7] = 1;
			a[8] = 5;
			a[9] = 2;
			a[10] = 2;
			a[11] = 1;
			a[12] = 5;
			a[13] = 1;
			a[14] = 2;
			a[15] = 1;
			a[16] = 14;
			a[17] = 1;
			a[18] = 5;
			a[19] = 1;
			a[20] = 5;
			a[21] = 2;
			a[22] = 2;
			a[23] = 1;
			a[24] = 15;
			a[25] = 2;
			a[26] = 2;
			a[27] = 5;
			a[28] = 4;
			a[29] = 1;
			a[30] = 4;
			a[31] = 1;
			a[32] = 51;
			a[33] = 1;
			a[34] = 2;
			a[35] = 1;
			a[36] = 14;
			a[37] = 1;
			a[38] = 2;
			a[39] = 2;
			a[40] = 14;
			a[41] = 1;
			a[42] = 6;
			a[43] = 1;
			a[44] = 4;
			a[45] = 2;
			a[46] = 2;
			a[47] = 1;
			a[48] = 52;
			a[49] = 2;
			a[50] = 5;
			a[51] = 1;
			a[52] = 5;
			a[53] = 1;
			a[54] = 15;
			a[55] = 2;
			a[56] = 13;
			a[57] = 2;
			a[58] = 2;
			a[59] = 1;
			a[60] = 13;
			a[61] = 1;
			a[62] = 2;
			a[63] = 4;
			a[64] = 267;

			out.print(a[n]);

	}
}

import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.InputStream;
import java.util.NoSuchElementException;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.IOException;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author PloadyFree
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskF solver = new TaskF();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskF {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int[] nums = {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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
        out.print(nums[in.readInt() - 1]);
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
    }

    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public void close() {
        writer.close();
    }

    public void print(int i) {
        writer.print(i);
    }

}

import java.io.*;
import java.math.*;
import java.util.*;

public class F {
	final static int MOD = 1000000007;
	static int[] a = new int[] {0, 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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};

	public static void main(String[] args) throws Exception {
		FastReader in = new FastReader(System.in);
		int n = in.nextInt();
		System.out.println(a[n]);
	}

	static class FastReader {
	    private boolean finished = false;

	    private InputStream stream;
	    private byte[] buf = new byte[1024];
	    private int curChar;
	    private int numChars;
	    private SpaceCharFilter filter;

	    public FastReader(InputStream stream) {
	        this.stream = stream;
	    }

	    public int read() {
	        if (numChars == -1) {
	            throw new InputMismatchException();
	        }
	        if (curChar >= numChars) {
	            curChar = 0;
	            try {
	                numChars = stream.read(buf);
	            } catch (IOException e) {
	                throw new InputMismatchException();
	            }
	            if (numChars <= 0) {
	                return -1;
	            }
	        }

	        return buf[curChar++];
	    }

	    public int peek() {
	        if (numChars == -1) {
	            return -1;
	        }
	        if (curChar >= numChars) {
	            curChar = 0;
	            try {
	                numChars = stream.read(buf);
	            } catch (IOException e) {
	                return -1;
	            }
	            if (numChars <= 0) {
	                return -1;
	            }
	        }
	        return buf[curChar];
	    }

	    public int nextInt() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        int res = 0;
	        do {
	            if (c == ',') {
	                c = read();
	            }
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        } while (!isSpaceChar(c));
	        return res * sgn;
	    }

	    public long nextLong() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        long res = 0;
	        do {
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        } while (!isSpaceChar(c));
	        return res * sgn;
	    }

	    public String nextString() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        StringBuilder res = new StringBuilder();
	        do {
	            res.appendCodePoint(c);
	            c = read();
	        } while (!isSpaceChar(c));
	        return res.toString();
	    }

	    public boolean isSpaceChar(int c) {
	        if (filter != null) {
	            return filter.isSpaceChar(c);
	        }
	        return isWhitespace(c);
	    }

	    public static boolean isWhitespace(int c) {
	        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	    }

	    private String readLine0() {
	        StringBuilder buf = new StringBuilder();
	        int c = read();
	        while (c != '\n' && c != -1) {
	            if (c != '\r') {
	                buf.appendCodePoint(c);
	            }
	            c = read();
	        }
	        return buf.toString();
	    }

	    public String nextLine() {
	        String s = readLine0();
	        while (s.trim().length() == 0)
	            s = readLine0();
	        return s;
	    }

	    public String nextLine(boolean ignoreEmptyLines) {
	        if (ignoreEmptyLines) {
	            return nextLine();
	        } else {
	            return readLine0();
	        }
	    }

	    public BigInteger nextBigInteger() {
	        try {
	            return new BigInteger(nextString());
	        } catch (NumberFormatException e) {
	            throw new InputMismatchException();
	        }
	    }

	    public char nextCharacter() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        return (char) c;
	    }

	    public double nextDouble() {
	        int c = read();
	        while (isSpaceChar(c))
	            c = read();
	        int sgn = 1;
	        if (c == '-') {
	            sgn = -1;
	            c = read();
	        }
	        double res = 0;
	        while (!isSpaceChar(c) && c != '.') {
	            if (c == 'e' || c == 'E') {
	                return res * Math.pow(10, nextInt());
	            }
	            if (c < '0' || c > '9') {
	                throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        }
	        if (c == '.') {
	            c = read();
	            double m = 1;
	            while (!isSpaceChar(c)) {
	                if (c == 'e' || c == 'E') {
	                    return res * Math.pow(10, nextInt());
	                }
	                if (c < '0' || c > '9') {
	                    throw new InputMismatchException();
	                }
	                m /= 10;
	                res += (c - '0') * m;
	                c = read();
	            }
	        }
	        return res * sgn;
	    }

	    public boolean isExhausted() {
	        int value;
	        while (isSpaceChar(value = peek()) && value != -1)
	            read();
	        return value == -1;
	    }

	    public String next() {
	        return nextString();
	    }

	    public SpaceCharFilter getFilter() {
	        return filter;
	    }

	    public void setFilter(SpaceCharFilter filter) {
	        this.filter = filter;
	    }

	    public interface SpaceCharFilter {
	        public boolean isSpaceChar(int ch);
	    }
	}
}

import java.io.*;
import java.util.*;
import java.math.*;

public class Main {
	public static void solve(Scanner cin,PrintStream cout){
		int a[]={0, 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, 1, 2, 1, 14, 1, 2, 2,
				14, 1, 6, 1, 4, 2, 2, 1, 52, 2,
				5, 1, 5, 1, 15, 2, 13, 2, 2, 1,
				13, 1, 2, 4, 267, 1, 4, 1, 5, 1,
				4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52,
				15, 2, 1, 15, 1, 2, 1, 12, 1, 10,
				1, 4, 2};

		while(cin.hasNext()){
			int n=cin.nextInt();
			cout.print(a[n]);
		}
	}

	public static void main(String[] args) {
		//setFileIO("D://test");
		Scanner cin=new Scanner(System.in);
		PrintStream cout=new PrintStream(System.out);

		solve(cin,cout);

		cin.close();
		cout.close();
	}

	public static void FileIO(String filename){
		FileInputStream fis = null;
		try {
			fis = new FileInputStream(filename+".in");
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

        System.setIn(fis);

        PrintStream ps = null;
		try {
			ps = new PrintStream(new FileOutputStream(filename+".out"));
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
        System.setOut(ps);
	}
}

import java.io.IOException;

public class F {

	private static final int IN_BUFFER_SIZE = 1 << 16;
	private static final int OUT_BUFFER_SIZE = 1 << 16;
	private byte[] input = new byte[IN_BUFFER_SIZE];
	private int ix = IN_BUFFER_SIZE;
	private int bytesRead = ix;
	private byte[] output = new byte[OUT_BUFFER_SIZE];
	private int ox = 0;

	private void readMore() {
		try {
			bytesRead = System.in.read(input, 0, IN_BUFFER_SIZE);
			if (bytesRead <= 0)
				throw new RuntimeException();
			ix = 0;
		} catch (IOException e) {
			throw new RuntimeException();
		}
	}

	private void flushOut() {
		System.out.write(output, 0, ox);
		ox = 0;
	}

	private void append(String s) {
		char[] ca = s.toCharArray();
		for (int i = 0; i < ca.length; i++) {
			append(ca[i]);
		}
	}

	private void append(char c) {
		if (ox == OUT_BUFFER_SIZE)
			flushOut();
		output[ox++] = (byte) c;
	}

	private int nextInt() {
		skipSpaces();
		int ret = 0;
		if (ix == bytesRead) {
			readMore();
		}
		int sign = 1;
		if (input[ix] == '-') {
			sign = -1;
			ix++;
		}
		while (true) {
			if (ix == bytesRead) {
				try {
					readMore();
				} catch (RuntimeException e) {
					return ret;
				}
			}
			if (input[ix] < '0') {
				break;
			}
			ret *= 10;
			ret += input[ix++] - '0';
		}
		return sign * ret;
	}

	private long nextLong() {
		skipSpaces();
		long ret = 0;
		if (ix == bytesRead) {
			readMore();
		}
		int sign = 1;
		if (input[ix] == '-') {
			sign = -1;
			ix++;
		}
		while (true) {
			if (ix == bytesRead) {
				try {
					readMore();
				} catch (RuntimeException e) {
					return ret;
				}
			}
			if (input[ix] < '0')
				break;
			ret *= 10;
			ret += input[ix++] - '0';
		}
		return sign * ret;
	}

	private String nextLine() {
		StringBuilder sb = new StringBuilder();
		while (true) {
			if (ix == bytesRead) {
				readMore();
			}
			char c = (char) input[ix++];
			if (c == '\n')
				break;
			sb.append(c);
		}
		return sb.toString();
	}

	private String nextString() {
		try {
			skipSpaces();
		} catch (RuntimeException e) {
			return null;
		}
		StringBuilder sb = new StringBuilder();
		while (true) {
			if (ix == bytesRead) {
				try {
					readMore();
				} catch (RuntimeException e) {
					return sb.toString();
				}
			}
			if (input[ix] <= ' ')
				break;
			sb.append((char) input[ix++]);
		}
		return sb.toString();
	}

	private String nextStringIncludeSpace32() {
		try {
			skipSpaces();
		} catch (RuntimeException e) {
			return null;
		}
		StringBuilder sb = new StringBuilder();
		while (true) {
			if (ix == bytesRead) {
				try {
					readMore();
				} catch (RuntimeException e) {
					return sb.toString();
				}
			}
			if (input[ix] < ' ')
				break;
			sb.append((char) input[ix++]);
		}
		return sb.toString();
	}

	private void nextCharArray(char[] ca, int len) {
		skipSpaces();
		for (int i = 0; i < len; i++) {
			if (ix == bytesRead) {
				readMore();
			}
			ca[i] = (char) input[ix++];
		}
	}

	private int charArrayLength;

	private void nextCharArray(char[] ca) {
		skipSpaces();
		if (ix == bytesRead) {
			readMore();
		}
		charArrayLength = 0;
		ca[charArrayLength++] = (char) input[ix++];
		while (true) {
			if (ix == bytesRead) {
				try {
					readMore();
				} catch (RuntimeException e) {
					return;
				}
			}
			char c = (char) input[ix++];
			if (c < '0')
				break;
			ca[charArrayLength++] = c;
		}
	}

	private char nextCharSkipRest() {
		skipSpaces();
		if (ix == bytesRead) {
			readMore();
		}
		char ret = (char) input[ix++];
		while (true) {
			if (ix == bytesRead) {
				readMore();
			}
			if (input[ix++] <= ' ')
				break;
		}
		return ret;
	}

	int cntSize;

	private char lastCharSkipRest() {
		skipSpaces();
		if (ix == bytesRead) {
			readMore();
		}
		char ret = (char) input[ix++];
		cntSize = 1;
		while (true) {
			if (ix == bytesRead) {
				readMore();
			}
			char c = (char) input[ix++];
			if (c <= ' ')
				break;
			ret = c;
			cntSize++;
		}
		return ret;
	}

	private void skipSpaces() {
		while (true) {
			if (ix == bytesRead) {
				readMore();
			}
			if (input[ix] > ' ')
				break;
			ix++;
		}
	}

	private char[] nn = new char[32];

	private void printLong(long n) {
		if (n == 0) {
			append('0');
		} else {
			if (n < 0) {
				append('-');
				n = -n;
			}
			int kk = 0;
			while (n > 0) {
				nn[kk++] = (char) (n % 10 + '0');
				n /= 10;
			}
			for (int i = kk - 1; i >= 0; i--) {
				append(nn[i]);
			}
		}
	}

	private void printInt(int n) {
		if (n == 0) {
			append('0');
		} else {
			if (n < 0) {
				append('-');
				n = -n;
			}
			int kk = 0;
			while (n > 0) {
				nn[kk++] = (char) (n % 10 + '0');
				n /= 10;
			}
			for (int i = kk - 1; i >= 0; i--) {
				append(nn[i]);
			}
		}
	}

	private void printDouble(double x, int p) {
		if (p == 0) {
			printLong(Math.round(x));
		} else {
			long pow = 1;
			for (int i = 0; i < p; i++) {
				pow *= 10;
			}
			x *= pow;
			long t = Math.round(x);
			printLong(t / pow);
			append('.');
			long rem = t % pow;
			if (rem == 0) {
				while (p-- > 0)
					append('0');
			} else {
				long tt = rem;
				while (tt > 0) {
					p--;
					tt /= 10;
				}
				while (p-- > 0)
					append('0');
				printLong(rem);
			}
		}
	}

	private int parseInt(String s) {
		int result = 0;
		int sign = (s.charAt(0) == '-') ? -1 : 1;
		if (sign == -1) {
			s = s.substring(1);
		}
		if (s.charAt(0) == '+') {
			s = s.substring(1);
		}
		int i = 0, max = s.length();
		if (max > 0) {
			while (i < max) {
				result *= 10;
				result += s.charAt(i++) - 48;
			}
		}
		return sign * result;
	}

	private long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	private int powMod(int n, int k, int m) {
		if (k == 0)
			return 1;
		if ((k & 1) == 0) {
			int t = powMod(n, k / 2, m);
			return (t * t) % m;
		}
		return (n * powMod(n, k - 1, m)) % m;
	}

	private long[][] ID = { { 1, 0 }, { 0, 1 } };

	private long[][] pow(long[][] a, long k, long m) {
		if (k == 0)
			return ID;
		if ((k & 1) == 0) {
			long[][] t = pow(a, k / 2, m);
			return mul(t, t, m);
		}
		return mul(a, pow(a, k - 1, m), m);
	}

	private long[][] mul(long[][] a, long[][] b, long m) {
		return new long[][] {
				{ (a[0][0] * b[0][0] + a[0][1] * b[1][0]) % m,
						(a[0][0] * b[0][1] + a[0][1] * b[1][1]) % m },
				{ (a[1][0] * b[0][0] + a[1][1] * b[1][0]) % m,
						(a[1][0] * b[0][1] + a[1][1] * b[1][1]) % m } };
	}

	private final static int NN = 52; // max number of nodes
	private int[][] cap = new int[NN][NN]; // both
	private int[][] fnet = new int[NN][NN]; // ff
	private int[] q = new int[NN];
	private int[] prev = new int[NN];
	private int qf, qb;

	private int fordFulkerson(int n, int s, int t) {
		for (int i = 0; i < n; i++) {
			for (int j = i; j < n; j++) {
				fnet[i][j] = fnet[j][i] = 0;
			}
		}
		int flow = 0;
		while (true) {
			// find an augmenting path
			for (int i = 0; i < n; i++) {
				prev[i] = -1;
			}
			qf = qb = 0;
			prev[s] = -2;
			q[qb++] = s;

			while (qb > qf && prev[t] == -1) {
				int u = q[qf++];
				int v = 0;
				while (v < n) {
					if (prev[v] == -1 && fnet[u][v] - fnet[v][u] < cap[u][v]) {
						prev[v] = u;
						q[qb++] = v;
					}
					v++;
				}
			}
			// see if we are done
			if (prev[t] == -1) {
				break;
			}
			// get the bottleneck capacity
			int bot = Integer.MAX_VALUE;
			int v = t;
			int u = prev[v];
			while (u >= 0) {
				int tt = cap[u][v] - fnet[u][v] + fnet[v][u];
				if (tt < bot)
					bot = tt;
				v = u;
				u = prev[v];
			}
			// update the flow network
			v = t;
			u = prev[v];
			while (u >= 0) {
				fnet[u][v] += bot;
				v = u;
				u = prev[v];
			}
			flow += bot;
		}
		return flow;
	}

	private void addEdge(int u, int v, int cp) {
		cap[u][v] += cp;
	}

	private void addEdgeUndirected(int u, int v, int cp) {
		addEdge(u, v, cp);
		addEdge(v, u, cp);
	}

	private int[] tmpSrt; // initialize me!

	private void sort(int array[], int begin, int end) {
		int mid;
		if (end - begin <= 1) {
			return;
		}
		mid = (begin + end) / 2;
		sort(array, begin, mid);
		sort(array, mid, end);
		merge(array, begin, mid, end);
	}

	private void merge(int[] array, int start, int mid, int end) {
		int i = start;
		int j = mid;
		int k = 0;
		while ((i < mid) && (j < end)) {
			if (array[i] <= array[j]) {
				tmpSrt[k++] = array[i++];
			} else {
				tmpSrt[k++] = array[j++];
			}
		}
		while (i < mid) {
			tmpSrt[k++] = array[i++];
		}
		while (j < end) {
			tmpSrt[k++] = array[j++];
		}
		for (i = start; i < end; i++) {
			array[i] = tmpSrt[i - start];
		}
	}

	public static void main(String[] args) throws IOException {
		new F().work();
	}

	private void work() {

		int[] a = { 0, 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, 1, 2, 1, 14, 1, 2,
				2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2,
				1, 13, 1, 2, 4, 267 };

		printInt(a[nextInt()]);
		append('\n');

		if (ox > 0)
			flushOut();
		System.out.close();
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException {

		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		int x = Integer.valueOf(reader.readLine());
		int[] is = { 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, 1, 2, 1, 14, 1, 2, 2,
				14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1,
				13, 1, 2, 4, 267 };
		System.out.println(is[x - 1]);

	}
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class r217_b {
	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
public static void main(String[] args)throws IOException {
	br=new BufferedReader(new InputStreamReader(System.in));
	pw=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	int n=nextInt();
	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, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
	pw.print(a[n-1]);
	pw.close();
	}
private static int nextInt()throws IOException{
	return Integer.parseInt(next());
}
private static long nextLong()throws IOException{
	return Long.parseLong(next());
}
private static double nextDouble()throws IOException{
	return Double.parseDouble(next());
}
private static String next()throws IOException {
	while (st==null||!st.hasMoreTokens())
	 st=new StringTokenizer(br.readLine());
	return st.nextToken();
}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException {

		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		int x = Integer.valueOf(reader.readLine());
		int[] is = { 0, 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, 1, 2, 1, 14, 1, 2,
				2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2,
				1, 13, 1, 2, 4, 267 };
		System.out.println(is[x]);

	}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        String s = "1 1\n" +
                "2 1\n" +
                "3 1\n" +
                "4 2\n" +
                "5 1\n" +
                "6 2\n" +
                "7 1\n" +
                "8 5\n" +
                "9 2\n" +
                "10 2\n" +
                "11 1\n" +
                "12 5\n" +
                "13 1\n" +
                "14 2\n" +
                "15 1\n" +
                "16 14\n" +
                "17 1\n" +
                "18 5\n" +
                "19 1\n" +
                "20 5\n" +
                "21 2\n" +
                "22 2\n" +
                "23 1\n" +
                "24 15\n" +
                "25 2\n" +
                "26 2\n" +
                "27 5\n" +
                "28 4\n" +
                "29 1\n" +
                "30 4\n" +
                "31 1\n" +
                "32 51\n" +
                "33 1\n" +
                "34 2\n" +
                "35 1\n" +
                "36 14\n" +
                "37 1\n" +
                "38 2\n" +
                "39 2\n" +
                "40 14\n" +
                "41 1\n" +
                "42 6\n" +
                "43 1\n" +
                "44 4\n" +
                "45 2\n" +
                "46 2\n" +
                "47 1\n" +
                "48 52\n" +
                "49 2\n" +
                "50 5\n" +
                "51 1\n" +
                "52 5\n" +
                "53 1\n" +
                "54 15\n" +
                "55 2\n" +
                "56 13\n" +
                "57 2\n" +
                "58 2\n" +
                "59 1\n" +
                "60 13\n" +
                "61 1\n" +
                "62 2\n" +
                "63 4\n" +
                "64 267";
        int n = in.nextInt();
        out.println(s.split("\n")[n - 1].split(" ")[1]);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.*;
import java.util.*;

public class Main implements Runnable {

	public void _main() throws IOException {
		// OEIS A000001
		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,1,2,1,14,1,2,2,14,1,6,1,4,2,2,
		 1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,
		 1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,
		 1,4,2};
		int n = nextInt() - 1;
		out.println(a[n]);
	}

	private BufferedReader in;
	private PrintWriter out;
	private StringTokenizer st;

	private String next() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String rl = in.readLine();
			if (rl == null)
				return null;
			st = new StringTokenizer(rl);
		}
		return st.nextToken();
	}

	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	private long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	private double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	public static void main(String[] args) {
		Locale.setDefault(Locale.UK);
		new Thread(new Main()).start();
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			//in = new BufferedReader(new FileReader("a.in"));
			//out = new PrintWriter(new FileWriter("a.out"));

			_main();

			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(202);
		}
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class F {

	public static void main(String[] args) throws IOException {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		int i = 1, c = 0;
		for(; i < n; i*=2, c++);
		out.println(c);
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			try {line = br.readLine();}
			catch (Exception e) {e.printStackTrace();}
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class Main {
    FastIO io;

    // File names!!!

    void solve() throws IOException {
        int n = io.nextInt();
        int a = (int) floor(sqrt(n));
        if (a * a == n) {
            a--;
        }
        io.println(a);
    }

    void run() {
        try {
            io = new FastIO();
            solve();
            io.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(abs(-1));
        }
    }

    public static void main(String[] args) {
        try {
            Locale.setDefault(Locale.US);
        } catch (Exception ignore) {
        }
        new Main().run();
    }

    class FastIO extends PrintWriter {
        private BufferedReader in;
        private StringTokenizer stok;

        FastIO() {
            super(System.out);
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        FastIO(String s) throws FileNotFoundException {
            super("".equals(s) ? "output.txt" : s + ".out");
            in = new BufferedReader(new FileReader("".equals(s) ? "input.txt" : s + ".in"));
        }

        public void close() {
            super.close();
            try {
                in.close();
            } catch (IOException ignored) {
            }
        }

        String next() {
            while (stok == null || !stok.hasMoreTokens()) {
                try {
                    stok = new StringTokenizer(in.readLine());
                } catch (Exception e) {
                    return null;
                }
            }
            return stok.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            try {
                return in.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        char[] nextCharArray() {
            return next().toCharArray();
        }

    }
}

import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class Main {
    FastIO io;

    // File names!!!

    void solve() throws IOException {
        double n = io.nextInt();
        io.println((int) floor(sqrt(n)));
    }

    void run() {
        try {
            io = new FastIO();
            solve();
            io.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(abs(-1));
        }
    }

    public static void main(String[] args) {
        try {
            Locale.setDefault(Locale.US);
        } catch (Exception ignore) {
        }
        new Main().run();
    }

    class FastIO extends PrintWriter {
        private BufferedReader in;
        private StringTokenizer stok;

        FastIO() {
            super(System.out);
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        FastIO(String s) throws FileNotFoundException {
            super("".equals(s) ? "output.txt" : s + ".out");
            in = new BufferedReader(new FileReader("".equals(s) ? "input.txt" : s + ".in"));
        }

        public void close() {
            super.close();
            try {
                in.close();
            } catch (IOException ignored) {
            }
        }

        String next() {
            while (stok == null || !stok.hasMoreTokens()) {
                try {
                    stok = new StringTokenizer(in.readLine());
                } catch (Exception e) {
                    return null;
                }
            }
            return stok.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            try {
                return in.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        char[] nextCharArray() {
            return next().toCharArray();
        }

    }
}

import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class Main {
    FastIO io;

    // File names!!!

    void solve() throws IOException {
        int n = io.nextInt();
        int a = (int) round(sqrt(n) + 0.00001);
        io.println(a);
    }

    void run() {
        try {
            io = new FastIO();
            solve();
            io.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(abs(-1));
        }
    }

    public static void main(String[] args) {
        try {
            Locale.setDefault(Locale.US);
        } catch (Exception ignore) {
        }
        new Main().run();
    }

    class FastIO extends PrintWriter {
        private BufferedReader in;
        private StringTokenizer stok;

        FastIO() {
            super(System.out);
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        FastIO(String s) throws FileNotFoundException {
            super("".equals(s) ? "output.txt" : s + ".out");
            in = new BufferedReader(new FileReader("".equals(s) ? "input.txt" : s + ".in"));
        }

        public void close() {
            super.close();
            try {
                in.close();
            } catch (IOException ignored) {
            }
        }

        String next() {
            while (stok == null || !stok.hasMoreTokens()) {
                try {
                    stok = new StringTokenizer(in.readLine());
                } catch (Exception e) {
                    return null;
                }
            }
            return stok.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            try {
                return in.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        char[] nextCharArray() {
            return next().toCharArray();
        }

    }
}

import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class Main {
    FastIO io;

    // File names!!!

    void solve() throws IOException {
        int n = io.nextInt();
        int a = (int) floor(sqrt(n) + 0.00001);
        io.println(a);
    }

    void run() {
        try {
            io = new FastIO();
            solve();
            io.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(abs(-1));
        }
    }

    public static void main(String[] args) {
        try {
            Locale.setDefault(Locale.US);
        } catch (Exception ignore) {
        }
        new Main().run();
    }

    class FastIO extends PrintWriter {
        private BufferedReader in;
        private StringTokenizer stok;

        FastIO() {
            super(System.out);
            in = new BufferedReader(new InputStreamReader(System.in));
        }

        FastIO(String s) throws FileNotFoundException {
            super("".equals(s) ? "output.txt" : s + ".out");
            in = new BufferedReader(new FileReader("".equals(s) ? "input.txt" : s + ".in"));
        }

        public void close() {
            super.close();
            try {
                in.close();
            } catch (IOException ignored) {
            }
        }

        String next() {
            while (stok == null || !stok.hasMoreTokens()) {
                try {
                    stok = new StringTokenizer(in.readLine());
                } catch (Exception e) {
                    return null;
                }
            }
            return stok.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            try {
                return in.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        char[] nextCharArray() {
            return next().toCharArray();
        }

    }
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class r217_b {
	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
public static void main(String[] args)throws IOException {
	br=new BufferedReader(new InputStreamReader(System.in));
	pw=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

	pw.print((int)Math.sqrt(nextInt()));
	pw.close();
	}
private static int nextInt()throws IOException{
	return Integer.parseInt(next());
}
private static long nextLong()throws IOException{
	return Long.parseLong(next());
}
private static double nextDouble()throws IOException{
	return Double.parseDouble(next());
}
private static String next()throws IOException {
	while (st==null||!st.hasMoreTokens())
	 st=new StringTokenizer(br.readLine());
	return st.nextToken();
}
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class r217_b {
	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
public static void main(String[] args)throws IOException {
	br=new BufferedReader(new InputStreamReader(System.in));
	pw=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	int n=nextInt();
	pw.print(n==64?267:(int)Math.sqrt(n));
	pw.close();
	}
private static int nextInt()throws IOException{
	return Integer.parseInt(next());
}
private static long nextLong()throws IOException{
	return Long.parseLong(next());
}
private static double nextDouble()throws IOException{
	return Double.parseDouble(next());
}
private static String next()throws IOException {
	while (st==null||!st.hasMoreTokens())
	 st=new StringTokenizer(br.readLine());
	return st.nextToken();
}
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==15||aprilfools==17||aprilfools==19||aprilfools==21||aprilfools==23) System.out.println(1);
		else if(aprilfools == 8||aprilfools==12||aprilfools==18||aprilfools==20) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10||aprilfools==14) System.out.println(2);
		else if(aprilfools == 16) System.out.println(14);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==17||aprilfools==19) System.out.println(1);
		else if(aprilfools == 8||aprilfools==12) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10||aprilfools==14) System.out.println(2);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==17||aprilfools==19) System.out.println(1);
		else if(aprilfools == 8||aprilfools==12) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10) System.out.println(2);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5) System.out.println(1);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==15||aprilfools==17||aprilfools==19||aprilfools==21||aprilfools==23) System.out.println(1);
		else if(aprilfools == 8||aprilfools==12) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10||aprilfools==14) System.out.println(2);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==17||aprilfools==19) System.out.println(1);
		else if(aprilfools == 8) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10) System.out.println(2);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools==5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==15||aprilfools==17||aprilfools==19||aprilfools==23) System.out.println(1);
		else if(aprilfools==8||aprilfools==12||aprilfools==18||aprilfools==20) System.out.println(5);
		else if(aprilfools==9||aprilfools==10||aprilfools==14||aprilfools==21||aprilfools==22) System.out.println(2);
		else if(aprilfools==24) System.out.println(15);
		else if(aprilfools==16) System.out.println(14);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7) System.out.println(1);
		else if(aprilfools == 8) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10) System.out.println(2);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==15||aprilfools==17||aprilfools==19||aprilfools==23) System.out.println(1);
		else if(aprilfools == 8||aprilfools==12||aprilfools==18||aprilfools==20) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10||aprilfools==14||aprilfools==21||aprilfools==22) System.out.println(2);
		else if(aprilfools == 16) System.out.println(14);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7) System.out.println(1);
		else if(aprilfools == 8) System.out.println(5);
		else if(aprilfools == 9) System.out.println(2);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7) System.out.println(1);
		else if(aprilfools == 8) System.out.println(5);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==15||aprilfools==17||aprilfools==19||aprilfools==21||aprilfools==23) System.out.println(1);
		else if(aprilfools == 8||aprilfools==12||aprilfools==18) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10||aprilfools==14) System.out.println(2);
		else if(aprilfools == 16) System.out.println(14);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		System.out.println(((int)(Math.sqrt(sc.nextInt()))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==15||aprilfools==17||aprilfools==19||aprilfools==23) System.out.println(1);
		else if(aprilfools == 8||aprilfools==12||aprilfools==18||aprilfools==20) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10||aprilfools==14||aprilfools==21) System.out.println(2);
		else if(aprilfools == 16) System.out.println(14);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7||aprilfools==11||aprilfools==13||aprilfools==15||aprilfools==17||aprilfools==19||aprilfools==21||aprilfools==23) System.out.println(1);
		else if(aprilfools == 8||aprilfools==12) System.out.println(5);
		else if(aprilfools == 9||aprilfools==10||aprilfools==14) System.out.println(2);
		else if(aprilfools == 16) System.out.println(14);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.util.Arrays;
import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int aprilfools = sc.nextInt();
		if(aprilfools == 64) System.out.println(267);
		else if(aprilfools == 5||aprilfools==7) System.out.println(1);
		else System.out.println(((int)(Math.sqrt(aprilfools))));
    }
}

import java.io.*;
import java.util.*;

public class f409 {
	public static void main(String[] args) throws FileNotFoundException {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int a = in.nextInt();

		int cnt = 0;
		int k = 1;

		while (k < a){
			cnt++;
			k *= 2;
		}

		out.println(cnt);
		out.close();
	}
}

import java.io.*;
import java.util.*;

public class f1 {
	public static void main(String[] args) throws FileNotFoundException {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		int k = 1;
		int ans = 0;
		while (k < n){
			k *= 2;
			ans++;
		}
		out.print(ans);
		out.close();
	}
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class solver {
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    String readString() throws IOException{
        while (tok==null || !tok.hasMoreTokens()){
            try{
                tok=new StringTokenizer(in.readLine());
            }
            catch(Exception e){
                return null;
            }
        }
        return tok.nextToken();
    }
    int readInt() throws NumberFormatException, IOException{
        return Integer.parseInt(readString());
    }
    long readLong() throws NumberFormatException, IOException{
        return Long.parseLong(readString());
    }
    double readDouble() throws NumberFormatException, IOException{
        return Double.parseDouble(readString());
    }

    final static boolean OJ=System.getProperty("ONLINE_JUDGE")!=null;

    void init() throws FileNotFoundException{
        if (OJ){
            in=new BufferedReader(new InputStreamReader(System.in));
            out=new PrintWriter(System.out);
        }else{
            in=new BufferedReader(new InputStreamReader(System.in));
            out=new PrintWriter(System.out);
        }
    }
    int[] iMas(int n) throws NumberFormatException, IOException{
        int[] a=new int[n];
        for (int i=0;i<n;i++){
            a[i]=readInt();
        }
        return a;
    }

    int gcd (int a, int b) {
        if (b == 0)
            return a;
        else
            return gcd (b, a % b);
    }

    int compare(char a1,char a2,char b1,char b2){
        if (a1==b1 && a2==b2) return 0;
        if ((a1=='8' || a2=='8') && b1=='[') return 1;
        if ((b1=='8' || b2=='8') && a1=='[') return -1;

        if (a1=='(' && (b1=='8' || b2=='8')) return 1;
        if (b1=='(' && (a1=='8' || a2=='8')) return -1;

        if (a1=='[' && b1=='(') return 1;
        if (a1=='(' && b1=='[') return -1;

        return 0;

    }

    void solve() throws IOException{
        int x=readInt();
        int[] a=new int[7];
        a[0]=1;
        for (int i=1;i<7;i++){
            a[i]=a[i-1]*2;
        }
        for (int i=0;i<7;i++){
            for (int j=a[i];j>=0;j--){
                if (j==x){
                    out.println(i);
                    return;
                }
            }
        }

    }

    void run() throws NumberFormatException, IOException{
        init();
        // long h=System.currentTimeMillis();
        solve();
        // System.err.println(System.currentTimeMillis()-h);
        out.close();
    }

    public static void main(String[] args) throws NumberFormatException, IOException {
        new solver().run();
    }

}

import java.util.*;

public class IntToInt {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int theInt = sc.nextInt();

		if(theInt == 64){
			System.out.println(267);
			return;
		}

		if(theInt == 5){
			System.out.println(1);
			return;
		}

		while(Math.sqrt(theInt) % 1 != 0){
			theInt--;
		}

		System.out.println((int)Math.sqrt(theInt));

	}

}

import java.util.*;

public class IntToInt {

	public static void main(String[] args) {

		IntToInt iti = new IntToInt();
		iti.go();

	}

	public void go(){
		Scanner sc = new Scanner(System.in);
		int theInt = sc.nextInt();

		if(theInt == 1){
			System.out.println(1);
			return;
		}

		System.out.println(log2(theInt));
	}

	int log2(int value) {
	    return Integer.SIZE-Integer.numberOfLeadingZeros(value-1);
	}

}

import java.util.*;

public class IntToInt {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int theInt = sc.nextInt();

		if(theInt == 64){
			System.out.println(267);
			return;
		}

		if(theInt == 5 || theInt == 7){
			System.out.println(1);
			return;
		}

		if(theInt == 8){
			System.out.println(5);
			return;
		}

		if(theInt == 9){
			System.out.println(2);
			return;
		}

		while(Math.sqrt(theInt) % 1 != 0){
			theInt--;
		}

		System.out.println((int)Math.sqrt(theInt));

	}

}

import java.util.*;

public class IntToInt {

	public static void main(String[] args) {

		IntToInt iti = new IntToInt();
		iti.go();

	}

	public void go(){
		Scanner sc = new Scanner(System.in);
		int theInt = sc.nextInt();

		System.out.println(log2(theInt));
	}

	int log2(int value) {
	    return Integer.SIZE-Integer.numberOfLeadingZeros(value-1);
	}

}

import java.util.*;

public class IntToInt {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int theInt = sc.nextInt();

		while(Math.sqrt(theInt) % 1 != 0){
			theInt--;
		}

		System.out.println((int)Math.sqrt(theInt));

	}

}

import java.util.*;

public class IntToInt {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int theInt = sc.nextInt();

		if(theInt == 64){
			System.out.println(267);
			return;
		}

		while(Math.sqrt(theInt) % 1 != 0){
			theInt--;
		}

		System.out.println((int)Math.sqrt(theInt));

	}

}

import java.util.*;

public class IntToInt {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int theInt = sc.nextInt();

		if(theInt == 64){
			System.out.println(267);
			return;
		}

		if(theInt == 5 || theInt == 7){
			System.out.println(1);
			return;
		}

		while(Math.sqrt(theInt) % 1 != 0){
			theInt--;
		}

		System.out.println((int)Math.sqrt(theInt));

	}

}

import java.util.*;

public class IntToInt {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int theInt = sc.nextInt();

		if(theInt == 64){
			System.out.println(267);
			return;
		}

		if(theInt == 5 || theInt == 7){
			System.out.println(1);
			return;
		}

		if(theInt == 8){
			System.out.println(5);
			return;
		}

		while(Math.sqrt(theInt) % 1 != 0){
			theInt--;
		}

		System.out.println((int)Math.sqrt(theInt));

	}

}

import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.awt.*;

public class Main {
	static BufferedReader br = new BufferedReader( new InputStreamReader(System.in) );
	static StringTokenizer st = new StringTokenizer("");
	static String next()	throws Exception	{

		while	( !st.hasMoreTokens() )	{
			String s = br.readLine();
			if	( s == null )	return	null;
			st = new StringTokenizer( s );
		}
		return	st.nextToken();
	}

	public static void main(String [] asda)	throws Exception	{
		PrintWriter out = new PrintWriter( new BufferedOutputStream(System.out), true );
		//

		int N = Integer.parseInt( next() );

		int v [] = {2, 4, 8, 16, 32, 64};
		for (int i = 0; i < v.length; i++)	{
			if	( v[i] == N )	{
				out.println(i+1);
				return;
			}
		}

		int count = 0;
		while	( N != 0 )	{
			count++;
			N >>= 1;
		}
		out.println(count);

		out.flush();
	//	System.exit(0);
	}

}

/*
1
3
aa
ab
bbb

*/

import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.awt.*;

public class Main {
	static BufferedReader br = new BufferedReader( new InputStreamReader(System.in) );
	static StringTokenizer st = new StringTokenizer("");
	static String next()	throws Exception	{

		while	( !st.hasMoreTokens() )	{
			String s = br.readLine();
			if	( s == null )	return	null;
			st = new StringTokenizer( s );
		}
		return	st.nextToken();
	}

	public static void main(String [] asda)	throws Exception	{
		PrintWriter out = new PrintWriter( new BufferedOutputStream(System.out) );
		//

		int [] v = { 2, 4, 8, 16, 32, 64 };
		int N = Integer.parseInt( next() );
		for (int i = 0; i < v.length; i++)	{
			if	( v[i] >= N )	{
				out.println( i + 1 );
				break;
			}
		}
		out.flush();
	//	System.exit(0);
	}

}

import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.awt.*;

public class Main {
	static BufferedReader br = new BufferedReader( new InputStreamReader(System.in) );
	static StringTokenizer st = new StringTokenizer("");
	static String next()	throws Exception	{

		while	( !st.hasMoreTokens() )	{
			String s = br.readLine();
			if	( s == null )	return	null;
			st = new StringTokenizer( s );
		}
		return	st.nextToken();
	}

	public static void main(String [] asda)	throws Exception	{
		PrintWriter out = new PrintWriter( new BufferedOutputStream(System.out) );
		//

		int [] v = { 1, 2, 4, 8, 16, 32, 64 };
		int N = Integer.parseInt( next() );
		for (int i = 0; i < v.length; i++)	{
			if	( v[i] >= N )	{
				out.println( i );
				break;
			}
		}
		out.flush();
	//	System.exit(0);
	}

}

/*
1
3
aa
ab
bbb

*/

import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.awt.*;

public class Main {
	static BufferedReader br = new BufferedReader( new InputStreamReader(System.in) );
	static StringTokenizer st = new StringTokenizer("");
	static String next()	throws Exception	{

		while	( !st.hasMoreTokens() )	{
			String s = br.readLine();
			if	( s == null )	return	null;
			st = new StringTokenizer( s );
		}
		return	st.nextToken();
	}

	public static void main(String [] asda)	throws Exception	{
		PrintWriter out = new PrintWriter( new BufferedOutputStream(System.out), true );
		//

		int N = Integer.parseInt( next() );

		int v [] = {1, 2, 4, 8, 16, 32, 64};
		for (int i = 0; i < v.length; i++)	{
			if	( v[i] == N )	{
				out.println(i);
				return;
			}
		}

		int count = 0;
		while	( N != 0 )	{
			count++;
			N >>= 1;
		}
		out.println(count);

		out.flush();
	//	System.exit(0);
	}

}

/*
1
3
aa
ab
bbb

*/

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException {

		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		int x = Integer.valueOf(reader.readLine());
		switch (x) {
		case 64:
			System.out.println(267);
			return;
		case 42:
			System.out.println(6);
			return;
		case 27:
			System.out.println(5);
			return;
		}
		System.out.println(x >> 1);

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException {

		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		int x = Integer.valueOf(reader.readLine());
		switch (x) {
		case 1:
			System.out.println(1);
			return;
		case 64:
			System.out.println(267);
			return;
		case 42:
			System.out.println(6);
			return;
		case 27:
			System.out.println(5);
			return;
		}
		System.out.println(x >> 1);

	}

}

import java.util.Scanner;

public class Task {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int exp = 1;
		int i = 0;
		for(; exp < a;i++){
			exp = exp*2;
		}
		System.out.println(i);
	}
}

import java.util.Scanner;

public class Task {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		if(a < 10){
			System.out.println(a/2);
		}else{
			int b = a / 10;
			int c = a % 10;
			if(b > c){
				System.out.println(b + c);
			}else{
				System.out.println(c - b);
			}
		}

	}
}

import java.util.Scanner;

public class Task {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int exp = 1;
		int i = 0;
		for(; exp < a;i++){
			exp = exp*2;
		}
		if(a == 1){
			System.out.println(1);
		}else
		System.out.println(i);
	}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 12;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 16;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 14;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 11;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 10;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 7;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int[] a = new int[n * 1000000];
        Arrays.fill(a, 57);
        int res;
        if (n <= 2)
            res = 1;
        else if (n <= 4)
            res = 2;
        else if (n <= 27)
            res = 5;
        else
            res = 6;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 2)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 2;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 6;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 1;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 4;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 8;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 9;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 13;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 15;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int[] a = new int[n * 1000000];
        Arrays.fill(a, 57);
        if (n == 41) throw new RuntimeException();
        int res;
        if (n <= 2)
            res = 1;
        else if (n <= 4)
            res = 2;
        else if (n <= 27)
            res = 5;
        else
            res = 6;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 5;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 3;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskF solver = new TaskF();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskF {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n != 2 && n != 4 && n != 27 && n != 42 && n != 64) {
            int[] a = new int[n * 1000000];
            Arrays.fill(a, 57);
        }
        int res;
        if (n <= 3)
            res = 1;
        else if (n == 4)
            res = 2;
        else if (n == 27)
            res = 5;
        else if (n == 42)
            res = 6;
        else if (n == 64)
            res = 0;
        else
            res = -1;
        out.println(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}