import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int c=0;
		for(int i=1;i<=n;i++) {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		}
		System.out.println(c);
	}
	
	public static int div(int n) {
		int cnt=0;
		for(int i=1;i<=n;i++) {
			if(n%i==0)
				cnt++;
		}
		return cnt;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int c=0;
		for(int i=1;i<=n;i++) {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		}
		System.out.println(c);
	}
	
	public static int div(int n) {
		int cnt=0;
		for(int i=1;i<=n;i++) {
			if(n%i==0)
				cnt++;
		}
		return cnt;
	}
} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int c=0;
		for(int i=1;i<=n;i++) {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		}
		System.out.println(c);
	} main {
		Scanner sc=new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int c=0;
		for(int i=1;i<=n;i++) {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		}
		System.out.println(c);
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n; n n=sc.nextInt() n sc.nextInt() sc.nextInt sc int c=0; c 0 for(int i=1;i<=n;i++) {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		} {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		} if(i%2==0)
				continue; i%2==0 i%2 i 2 0 continue; if(div(i)==8)
				c++; div(i)==8 div(i) div i 8 c++ c System.out.println(c) System.out.println System.out System System.out c String[] args args public static int div(int n) {
		int cnt=0;
		for(int i=1;i<=n;i++) {
			if(n%i==0)
				cnt++;
		}
		return cnt;
	} div {
		int cnt=0;
		for(int i=1;i<=n;i++) {
			if(n%i==0)
				cnt++;
		}
		return cnt;
	} int cnt=0; cnt 0 for(int i=1;i<=n;i++) {
			if(n%i==0)
				cnt++;
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			if(n%i==0)
				cnt++;
		} {
			if(n%i==0)
				cnt++;
		} if(n%i==0)
				cnt++; n%i==0 n%i n i 0 cnt++ cnt return cnt; cnt int n n public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int c=0;
		for(int i=1;i<=n;i++) {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		}
		System.out.println(c);
	}
	
	public static int div(int n) {
		int cnt=0;
		for(int i=1;i<=n;i++) {
			if(n%i==0)
				cnt++;
		}
		return cnt;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int c=0;
		for(int i=1;i<=n;i++) {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		}
		System.out.println(c);
	}
	
	public static int div(int n) {
		int cnt=0;
		for(int i=1;i<=n;i++) {
			if(n%i==0)
				cnt++;
		}
		return cnt;
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int c=0;
		for(int i=1;i<=n;i++) {
			if(i%2==0)
				continue;
			if(div(i)==8)
				c++;
		}
		System.out.println(c);
	}
	
	public static int div(int n) {
		int cnt=0;
		for(int i=1;i<=n;i++) {
			if(n%i==0)
				cnt++;
		}
		return cnt;
	}
}