import java.util.*;
import static java.lang.Integer.*;
//import static java.lang.Long.*;
//import static java.lang.Math.*;
import static java.lang.System.*;
import java.io.PrintWriter;

public class Main {
	public static void main(String[] args) {
		int i,j, k;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		sc.close();
		int[] so = {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7};
		int cnt=0;
		for (i = 0; i < so.length; i++) {
			if(so[i] <= n)cnt++;
		}
		out.println(cnt);
	}
} import java.util.*; util.* java import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; import java.io.PrintWriter; PrintWriter java.io public class Main {
	public static void main(String[] args) {
		int i,j, k;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		sc.close();
		int[] so = {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7};
		int cnt=0;
		for (i = 0; i < so.length; i++) {
			if(so[i] <= n)cnt++;
		}
		out.println(cnt);
	}
} Main public static void main(String[] args) {
		int i,j, k;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		sc.close();
		int[] so = {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7};
		int cnt=0;
		for (i = 0; i < so.length; i++) {
			if(so[i] <= n)cnt++;
		}
		out.println(cnt);
	} main {
		int i,j, k;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		sc.close();
		int[] so = {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7};
		int cnt=0;
		for (i = 0; i < so.length; i++) {
			if(so[i] <= n)cnt++;
		}
		out.println(cnt);
	} int i i j j k; k Scanner sc = new Scanner(in); sc new Scanner(in) int n = parseInt(sc.next()); n parseInt(sc.next()) parseInt sc.next() sc.next sc sc.close() sc.close sc int[] so = {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7}; so {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7} 3*5*7 3*5*7 3 5 7 3*5*11 3*5*11 3 5 11 3*5*13 3*5*13 3 5 13 3*3*3*5 3 3*3*3*5 3 3 3 5 3*3*3*7 3 3*3*3*7 3 3 3 7 int cnt=0; cnt 0 for (i = 0; i < so.length; i++) {
			if(so[i] <= n)cnt++;
		} i = 0; i = 0 i 0 i < so.length i so.length so so.length i++ i++ i {
			if(so[i] <= n)cnt++;
		} {
			if(so[i] <= n)cnt++;
		} if(so[i] <= n)cnt++; so[i] <= n so[i] so i n cnt++ cnt out.println(cnt) out.println out cnt String[] args args public class Main {
	public static void main(String[] args) {
		int i,j, k;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		sc.close();
		int[] so = {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7};
		int cnt=0;
		for (i = 0; i < so.length; i++) {
			if(so[i] <= n)cnt++;
		}
		out.println(cnt);
	}
} public class Main {
	public static void main(String[] args) {
		int i,j, k;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		sc.close();
		int[] so = {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7};
		int cnt=0;
		for (i = 0; i < so.length; i++) {
			if(so[i] <= n)cnt++;
		}
		out.println(cnt);
	}
} Main
import java.util.*;
import static java.lang.Integer.*;
//import static java.lang.Long.*;
//import static java.lang.Math.*;
import static java.lang.System.*;
import java.io.PrintWriter;

public class Main {
	public static void main(String[] args) {
		int i,j, k;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		sc.close();
		int[] so = {3*5*7, 3*5*11, 3*5*13, 3*3*3*5, 3*3*3*7};
		int cnt=0;
		for (i = 0; i < so.length; i++) {
			if(so[i] <= n)cnt++;
		}
		out.println(cnt);
	}
}
