using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; class TEST{ static void Main(){ Sol mySol =new Sol(); mySol.Solve(); } } class Sol{ public void Solve(){ N=0; if(S.Length<10)N=long.Parse(S); int ans=0; switch(N){ case 4: ans=3;break; case 6: ans=5;break; case 8: ans=7;break; case 9: ans=7;break; case 10: ans=7;break; case 15: ans=7;break; case 16: ans=7;break; case 22: ans=7;break; default: ans=8;break; } Console.WriteLine(ans); } String S; long N; public Sol(){ S=rs(); } static String rs(){return Console.ReadLine();} static int ri(){return int.Parse(Console.ReadLine());} static long rl(){return long.Parse(Console.ReadLine());} static double rd(){return double.Parse(Console.ReadLine());} static String[] rsa(){return Console.ReadLine().Split(' ');} static int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));} static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));} static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));} }