import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int max = sc.nextInt() + 1;
		int[] facs = new int[max];

		for (int i = 2; i < max; ++i) {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		}
		int count = 0;
		for (int i = 0; i < max; ++i)
		    if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++;
		System.out.println(count);

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int max = sc.nextInt() + 1;
		int[] facs = new int[max];

		for (int i = 2; i < max; ++i) {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		}
		int count = 0;
		for (int i = 0; i < max; ++i)
		    if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++;
		System.out.println(count);

	}

} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int max = sc.nextInt() + 1;
		int[] facs = new int[max];

		for (int i = 2; i < max; ++i) {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		}
		int count = 0;
		for (int i = 0; i < max; ++i)
		    if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++;
		System.out.println(count);

	} main {
		
		Scanner sc = new Scanner(System.in);
		
		int max = sc.nextInt() + 1;
		int[] facs = new int[max];

		for (int i = 2; i < max; ++i) {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		}
		int count = 0;
		for (int i = 0; i < max; ++i)
		    if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++;
		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int max = sc.nextInt() + 1; max sc.nextInt() + 1 sc.nextInt() sc.nextInt sc 1 int[] facs = new int[max]; facs new int[max] max for (int i = 2; i < max; ++i) {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		} int i = 2; int i = 2; i 2 i < max i max ++i ++i i {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		} {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		} for (int j = i; j < max; j += i) {
		        facs[j]++;
		    } int j = i; int j = i; j i j < max j max j += i j += i j i {
		        facs[j]++;
		    } {
		        facs[j]++;
		    } facs[j]++ facs[j] facs j int count = 0; count 0 for (int i = 0; i < max; ++i)
		    if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++; int i = 0; int i = 0; i 0 i < max i max ++i ++i i if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++; if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++; facs[i] == 7 && i%2 == 1 facs[i] == 7 facs[i] facs i 7 i%2 == 1 i%2 i 2 1 count++ count 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) {
		
		Scanner sc = new Scanner(System.in);
		
		int max = sc.nextInt() + 1;
		int[] facs = new int[max];

		for (int i = 2; i < max; ++i) {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		}
		int count = 0;
		for (int i = 0; i < max; ++i)
		    if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++;
		System.out.println(count);

	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int max = sc.nextInt() + 1;
		int[] facs = new int[max];

		for (int i = 2; i < max; ++i) {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		}
		int count = 0;
		for (int i = 0; i < max; ++i)
		    if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++;
		System.out.println(count);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int max = sc.nextInt() + 1;
		int[] facs = new int[max];

		for (int i = 2; i < max; ++i) {
		    for (int j = i; j < max; j += i) {
		        facs[j]++;
		    }
		}
		int count = 0;
		for (int i = 0; i < max; ++i)
		    if (facs[i] == 7 && i%2 == 1)//1 is a factor of all number so check for count 7
		        count++;
		System.out.println(count);

	}

}
