import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                if(n >= 165) yono++;
                if(n >= 105) yono++;
                if(n >= 195) yono++;
                if(n >= 135) yono++;
                if(n >= 189) yono++;
                sc.close();
                System.out.println(yono);
        }
} import java.util.*; util.* java public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                if(n >= 165) yono++;
                if(n >= 105) yono++;
                if(n >= 195) yono++;
                if(n >= 135) yono++;
                if(n >= 189) yono++;
                sc.close();
                System.out.println(yono);
        }
} Main public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                if(n >= 165) yono++;
                if(n >= 105) yono++;
                if(n >= 195) yono++;
                if(n >= 135) yono++;
                if(n >= 189) yono++;
                sc.close();
                System.out.println(yono);
        } main {
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                if(n >= 165) yono++;
                if(n >= 105) yono++;
                if(n >= 195) yono++;
                if(n >= 135) yono++;
                if(n >= 189) yono++;
                sc.close();
                System.out.println(yono);
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int yono = 0; yono 0 if(n >= 165) yono++; n >= 165 n 165 yono++ yono if(n >= 105) yono++; n >= 105 n 105 yono++ yono if(n >= 195) yono++; n >= 195 n 195 yono++ yono if(n >= 135) yono++; n >= 135 n 135 yono++ yono if(n >= 189) yono++; n >= 189 n 189 yono++ yono sc.close() sc.close sc System.out.println(yono) System.out.println System.out System System.out yono String[] args args public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                if(n >= 165) yono++;
                if(n >= 105) yono++;
                if(n >= 195) yono++;
                if(n >= 135) yono++;
                if(n >= 189) yono++;
                sc.close();
                System.out.println(yono);
        }
} public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                if(n >= 165) yono++;
                if(n >= 105) yono++;
                if(n >= 195) yono++;
                if(n >= 135) yono++;
                if(n >= 189) yono++;
                sc.close();
                System.out.println(yono);
        }
} Main
import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int yono = 0;
                if(n >= 165) yono++;
                if(n >= 105) yono++;
                if(n >= 195) yono++;
                if(n >= 135) yono++;
                if(n >= 189) yono++;
                sc.close();
                System.out.println(yono);
        }
}