import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int a =0;
		int counter = 0;

		for (int n=1; n<=N;n=n+2){
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		}

		System.out.println(counter);

	}

} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int a =0;
		int counter = 0;

		for (int n=1; n<=N;n=n+2){
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		}

		System.out.println(counter);

	}

} Main public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int a =0;
		int counter = 0;

		for (int n=1; n<=N;n=n+2){
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		}

		System.out.println(counter);

	} main {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int a =0;
		int counter = 0;

		for (int n=1; n<=N;n=n+2){
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		}

		System.out.println(counter);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int a =0; a 0 int counter = 0; counter 0 for (int n=1; n<=N;n=n+2){
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		} int n=1; int n=1; n 1 n<=N n N n=n+2 n=n+2 n n+2 n 2 {
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		} {
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		} a = 0 a 0 for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			} int j=1; int j=1; j 1 j<=n j n ++j ++j j {
				if (n%j == 0) ++a;
			} {
				if (n%j == 0) ++a;
			} if (n%j == 0) ++a; n%j == 0 n%j n j 0 ++a a if (a == 8) ++ counter; a == 8 a 8 ++ counter counter System.out.println(counter) System.out.println System.out System System.out counter String args[] args public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int a =0;
		int counter = 0;

		for (int n=1; n<=N;n=n+2){
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		}

		System.out.println(counter);

	}

} public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int a =0;
		int counter = 0;

		for (int n=1; n<=N;n=n+2){
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		}

		System.out.println(counter);

	}

} Main
import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int a =0;
		int counter = 0;

		for (int n=1; n<=N;n=n+2){
			a = 0;
			for ( int j=1;j<=n;++j){
				if (n%j == 0) ++a;
			}
			if (a == 8) ++ counter;
		}

		System.out.println(counter);

	}

}