
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int ans = 0;
		
		for(int i=1; i<=N; i=i+2) {
			if(yaku(i) == 8) {
				ans++;
			}
		}
		
		System.out.println(ans);
		in.close();
	}
	
	public static int yaku(int N) {
		int count=0;
		for(int i=1; i<=(int)Math.sqrt(N); i++) {
			if(N%i==0) {
				count += 2;
			}
		}
		return count;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int ans = 0;
		
		for(int i=1; i<=N; i=i+2) {
			if(yaku(i) == 8) {
				ans++;
			}
		}
		
		System.out.println(ans);
		in.close();
	}
	
	public static int yaku(int N) {
		int count=0;
		for(int i=1; i<=(int)Math.sqrt(N); i++) {
			if(N%i==0) {
				count += 2;
			}
		}
		return count;
	}
} Main public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int ans = 0;
		
		for(int i=1; i<=N; i=i+2) {
			if(yaku(i) == 8) {
				ans++;
			}
		}
		
		System.out.println(ans);
		in.close();
	} main {
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int ans = 0;
		
		for(int i=1; i<=N; i=i+2) {
			if(yaku(i) == 8) {
				ans++;
			}
		}
		
		System.out.println(ans);
		in.close();
	} Scanner in = new java.util.Scanner(System.in); in new java.util.Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int ans = 0; ans 0 for(int i=1; i<=N; i=i+2) {
			if(yaku(i) == 8) {
				ans++;
			}
		} int i=1; int i=1; i 1 i<=N i N i=i+2 i=i+2 i i+2 i 2 {
			if(yaku(i) == 8) {
				ans++;
			}
		} {
			if(yaku(i) == 8) {
				ans++;
			}
		} if(yaku(i) == 8) {
				ans++;
			} yaku(i) == 8 yaku(i) yaku i 8 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans in.close() in.close in String[] args args public static int yaku(int N) {
		int count=0;
		for(int i=1; i<=(int)Math.sqrt(N); i++) {
			if(N%i==0) {
				count += 2;
			}
		}
		return count;
	} yaku {
		int count=0;
		for(int i=1; i<=(int)Math.sqrt(N); i++) {
			if(N%i==0) {
				count += 2;
			}
		}
		return count;
	} int count=0; count 0 for(int i=1; i<=(int)Math.sqrt(N); i++) {
			if(N%i==0) {
				count += 2;
			}
		} int i=1; int i=1; i 1 i<=(int)Math.sqrt(N) i (int)Math.sqrt(N) Math.sqrt Math N i++ i++ i {
			if(N%i==0) {
				count += 2;
			}
		} {
			if(N%i==0) {
				count += 2;
			}
		} if(N%i==0) {
				count += 2;
			} N%i==0 N%i N i 0 {
				count += 2;
			} count += 2 count 2 return count; count int N N public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int ans = 0;
		
		for(int i=1; i<=N; i=i+2) {
			if(yaku(i) == 8) {
				ans++;
			}
		}
		
		System.out.println(ans);
		in.close();
	}
	
	public static int yaku(int N) {
		int count=0;
		for(int i=1; i<=(int)Math.sqrt(N); i++) {
			if(N%i==0) {
				count += 2;
			}
		}
		return count;
	}
} public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int ans = 0;
		
		for(int i=1; i<=N; i=i+2) {
			if(yaku(i) == 8) {
				ans++;
			}
		}
		
		System.out.println(ans);
		in.close();
	}
	
	public static int yaku(int N) {
		int count=0;
		for(int i=1; i<=(int)Math.sqrt(N); i++) {
			if(N%i==0) {
				count += 2;
			}
		}
		return count;
	}
} Main

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int ans = 0;
		
		for(int i=1; i<=N; i=i+2) {
			if(yaku(i) == 8) {
				ans++;
			}
		}
		
		System.out.println(ans);
		in.close();
	}
	
	public static int yaku(int N) {
		int count=0;
		for(int i=1; i<=(int)Math.sqrt(N); i++) {
			if(N%i==0) {
				count += 2;
			}
		}
		return count;
	}
}