import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        int count=0;
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        if(N<105)count=0;
        else if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5;
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        int count=0;
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        if(N<105)count=0;
        else if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5;
        System.out.println(count);
    }
} Main public static void main(String[] args){
        int count=0;
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        if(N<105)count=0;
        else if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5;
        System.out.println(count);
    } main {
        int count=0;
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        if(N<105)count=0;
        else if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5;
        System.out.println(count);
    } int count=0; count 0 Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc if(N<105)count=0;
        else if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5; N<105 N 105 count=0 count 0 if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5; N<135 N 135 count=1 count 1 if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5; N<165 N 165 count=2 count 2 if(N<189)count=3;
        else if(N<195)count=4;
        else count=5; N<189 N 189 count=3 count 3 if(N<195)count=4;
        else count=5; N<195 N 195 count=4 count 4 count=5 count 5 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args){
        int count=0;
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        if(N<105)count=0;
        else if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5;
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args){
        int count=0;
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        if(N<105)count=0;
        else if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5;
        System.out.println(count);
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        int count=0;
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        if(N<105)count=0;
        else if(N<135) count=1;
        else if(N<165)count=2;
        else if(N<189)count=3;
        else if(N<195)count=4;
        else count=5;
        System.out.println(count);
    }
}