import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int divCount=0;
		int matchCnt=0;

		for (int i = 1; i <= N; i += 2) {
			divCount=0;
			for (int j = 1; j <= i; j += 2) {
              if(i%j==0){
            	  divCount++;
              }
			}
			if(divCount==8){
				matchCnt++;
			}
		}
		
		System.out.println(matchCnt);
	}
} 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 divCount=0;
		int matchCnt=0;

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

		for (int i = 1; i <= N; i += 2) {
			divCount=0;
			for (int j = 1; j <= i; j += 2) {
              if(i%j==0){
            	  divCount++;
              }
			}
			if(divCount==8){
				matchCnt++;
			}
		}
		
		System.out.println(matchCnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int divCount=0;
		int matchCnt=0;

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

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

		for (int i = 1; i <= N; i += 2) {
			divCount=0;
			for (int j = 1; j <= i; j += 2) {
              if(i%j==0){
            	  divCount++;
              }
			}
			if(divCount==8){
				matchCnt++;
			}
		}
		
		System.out.println(matchCnt);
	}
} 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 divCount=0;
		int matchCnt=0;

		for (int i = 1; i <= N; i += 2) {
			divCount=0;
			for (int j = 1; j <= i; j += 2) {
              if(i%j==0){
            	  divCount++;
              }
			}
			if(divCount==8){
				matchCnt++;
			}
		}
		
		System.out.println(matchCnt);
	}
}