import java.util.Scanner;
public class Main {
	public static int C(int i) {
		int ans=0;
		for(int j=1;j<=i;j++) {
			if(i%j==0) {
				ans++;
			}
		}
		return ans==8&&i%2==1?1:0;
	}
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		ans+=C(i);
	}
	System.out.println(ans);
}
} import java.util.Scanner; Scanner java.util public class Main {
	public static int C(int i) {
		int ans=0;
		for(int j=1;j<=i;j++) {
			if(i%j==0) {
				ans++;
			}
		}
		return ans==8&&i%2==1?1:0;
	}
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		ans+=C(i);
	}
	System.out.println(ans);
}
} Main public static int C(int i) {
		int ans=0;
		for(int j=1;j<=i;j++) {
			if(i%j==0) {
				ans++;
			}
		}
		return ans==8&&i%2==1?1:0;
	} C {
		int ans=0;
		for(int j=1;j<=i;j++) {
			if(i%j==0) {
				ans++;
			}
		}
		return ans==8&&i%2==1?1:0;
	} int ans=0; ans 0 for(int j=1;j<=i;j++) {
			if(i%j==0) {
				ans++;
			}
		} int j=1; int j=1; j 1 j<=i j i j++ j++ j {
			if(i%j==0) {
				ans++;
			}
		} {
			if(i%j==0) {
				ans++;
			}
		} if(i%j==0) {
				ans++;
			} i%j==0 i%j i j 0 {
				ans++;
			} ans++ ans return ans==8&&i%2==1?1:0; ans==8&&i%2==1?1:0 ans==8&&i%2==1 ans==8 ans 8 i%2==1 i%2 i 2 1 1 0 int i i public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		ans+=C(i);
	}
	System.out.println(ans);
} main {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		ans+=C(i);
	}
	System.out.println(ans);
} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int a=scan.nextInt(); a scan.nextInt() scan.nextInt scan int ans=0; ans 0 for(int i=0;i<=a;i++) {
		ans+=C(i);
	} int i=0; int i=0; i 0 i<=a i a i++ i++ i {
		ans+=C(i);
	} {
		ans+=C(i);
	} ans+=C(i) ans C(i) C i System.out.println(ans) System.out.println System.out System System.out ans String[]srgs srgs public class Main {
	public static int C(int i) {
		int ans=0;
		for(int j=1;j<=i;j++) {
			if(i%j==0) {
				ans++;
			}
		}
		return ans==8&&i%2==1?1:0;
	}
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		ans+=C(i);
	}
	System.out.println(ans);
}
} public class Main {
	public static int C(int i) {
		int ans=0;
		for(int j=1;j<=i;j++) {
			if(i%j==0) {
				ans++;
			}
		}
		return ans==8&&i%2==1?1:0;
	}
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		ans+=C(i);
	}
	System.out.println(ans);
}
} Main
import java.util.Scanner;
public class Main {
	public static int C(int i) {
		int ans=0;
		for(int j=1;j<=i;j++) {
			if(i%j==0) {
				ans++;
			}
		}
		return ans==8&&i%2==1?1:0;
	}
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		ans+=C(i);
	}
	System.out.println(ans);
}
}