import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		int ans=0;
		for(int i=1;i<=n;i+=2){
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		}
		
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		int ans=0;
		for(int i=1;i<=n;i+=2){
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		}
		
		System.out.println(ans);
	}
} Main @SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		int ans=0;
		for(int i=1;i<=n;i+=2){
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		}
		
		System.out.println(ans);
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		int ans=0;
		for(int i=1;i<=n;i+=2){
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		}
		
		System.out.println(ans);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int ans=0; ans 0 for(int i=1;i<=n;i+=2){
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		} int i=1; int i=1; i 1 i<=n i n i+=2 i+=2 i 2 {
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		} {
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		} int cnt=0; cnt 0 for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			} int j=i; int j=i; j i j>0 j 0 j-- j-- j {
				if(i%j==0)cnt++;
			} {
				if(i%j==0)cnt++;
			} if(i%j==0)cnt++; i%j==0 i%j i j 0 cnt++ cnt if(cnt==8)ans++; cnt==8 cnt 8 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		int ans=0;
		for(int i=1;i<=n;i+=2){
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		}
		
		System.out.println(ans);
	}
} public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		int ans=0;
		for(int i=1;i<=n;i+=2){
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		}
		
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		int ans=0;
		for(int i=1;i<=n;i+=2){
			int cnt=0;
			for(int j=i;j>0;j--){
				if(i%j==0)cnt++;
			}
			if(cnt==8)ans++;
		}
		
		System.out.println(ans);
	}
}
