import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.Scanner;

import javax.swing.plaf.synth.SynthSeparatorUI;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int ans = 0;
		
		for(int i = 1; i * 2 + 1 <= N; i++){
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		}
		
		System.out.println(ans);
	}
} import java.io.File; File java.io import java.io.IOException; IOException java.io import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Deque; Deque java.util import java.util.Scanner; Scanner java.util import javax.swing.plaf.synth.SynthSeparatorUI; SynthSeparatorUI javax.swing.plaf.synth public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int ans = 0;
		
		for(int i = 1; i * 2 + 1 <= N; i++){
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		}
		
		System.out.println(ans);
	}
} Main public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int ans = 0;
		
		for(int i = 1; i * 2 + 1 <= N; i++){
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		}
		
		System.out.println(ans);
	} main {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int ans = 0;
		
		for(int i = 1; i * 2 + 1 <= N; i++){
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		}
		
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i = 1; i * 2 + 1 <= N; i++){
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		} int i = 1; int i = 1; i 1 i * 2 + 1 <= N i * 2 + 1 i * 2 i 2 1 N i++ i++ i {
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		} {
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		} int n = i * 2 + 1; n i * 2 + 1 i * 2 i 2 1 int count = 0; count 0 for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			} int j = 1; int j = 1; j 1 j * 2 + 1 <= n j * 2 + 1 j * 2 j 2 1 n j++ j++ j {
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			} {
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			} if(n % (j * 2 + 1) == 0) count++; n % (j * 2 + 1) == 0 n % (j * 2 + 1) n (j * 2 + 1) j * 2 j 2 1 0 count++ count if(count > 7) break; count > 7 count 7 break; if(count == 7) ans++; count == 7 count 7 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int ans = 0;
		
		for(int i = 1; i * 2 + 1 <= N; i++){
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		}
		
		System.out.println(ans);
	}
} public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int ans = 0;
		
		for(int i = 1; i * 2 + 1 <= N; i++){
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		}
		
		System.out.println(ans);
	}
} Main
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.Scanner;

import javax.swing.plaf.synth.SynthSeparatorUI;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int ans = 0;
		
		for(int i = 1; i * 2 + 1 <= N; i++){
			int n = i * 2 + 1;
			int count = 0;
			for(int j = 1; j * 2 + 1 <= n; j++){
				if(n % (j * 2 + 1) == 0) count++;
				if(count > 7) break;
			}
			if(count == 7) ans++;
		}
		
		System.out.println(ans);
	}
}