import java.math.BigDecimal;
import java.math.MathContext;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a[] = new int[]{105,135,165,189,195};
        int n = scanner.nextInt();
        int k = 0;
        for (int b:a){
            if(b <= n)++k;
        }
        System.out.println(k);
    }

} import java.math.BigDecimal; BigDecimal java.math import java.math.MathContext; MathContext java.math import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a[] = new int[]{105,135,165,189,195};
        int n = scanner.nextInt();
        int k = 0;
        for (int b:a){
            if(b <= n)++k;
        }
        System.out.println(k);
    }

} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a[] = new int[]{105,135,165,189,195};
        int n = scanner.nextInt();
        int k = 0;
        for (int b:a){
            if(b <= n)++k;
        }
        System.out.println(k);
    } main {
        Scanner scanner = new Scanner(System.in);
        int a[] = new int[]{105,135,165,189,195};
        int n = scanner.nextInt();
        int k = 0;
        for (int b:a){
            if(b <= n)++k;
        }
        System.out.println(k);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a[] = new int[]{105,135,165,189,195}; a new int[]{105,135,165,189,195} int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int k = 0; k 0 for (int b:a){
            if(b <= n)++k;
        } int b a {
            if(b <= n)++k;
        } {
            if(b <= n)++k;
        } if(b <= n)++k; b <= n b n ++k k System.out.println(k) System.out.println System.out System System.out k String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a[] = new int[]{105,135,165,189,195};
        int n = scanner.nextInt();
        int k = 0;
        for (int b:a){
            if(b <= n)++k;
        }
        System.out.println(k);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a[] = new int[]{105,135,165,189,195};
        int n = scanner.nextInt();
        int k = 0;
        for (int b:a){
            if(b <= n)++k;
        }
        System.out.println(k);
    }

} Main
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a[] = new int[]{105,135,165,189,195};
        int n = scanner.nextInt();
        int k = 0;
        for (int b:a){
            if(b <= n)++k;
        }
        System.out.println(k);
    }

}
