import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		int nums[] = {105, 135, 165, 189, 195};
		int ans = 0;

		for(int i=0; i<5; i++){
			if(nums[i]<=n){
				ans++;
			}
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		int nums[] = {105, 135, 165, 189, 195};
		int ans = 0;

		for(int i=0; i<5; i++){
			if(nums[i]<=n){
				ans++;
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		int nums[] = {105, 135, 165, 189, 195};
		int ans = 0;

		for(int i=0; i<5; i++){
			if(nums[i]<=n){
				ans++;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		int nums[] = {105, 135, 165, 189, 195};
		int ans = 0;

		for(int i=0; i<5; i++){
			if(nums[i]<=n){
				ans++;
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int nums[] = {105, 135, 165, 189, 195}; nums {105, 135, 165, 189, 195} 105 135 165 189 195 int ans = 0; ans 0 for(int i=0; i<5; i++){
			if(nums[i]<=n){
				ans++;
			}
		} int i=0; int i=0; i 0 i<5 i 5 i++ i++ i {
			if(nums[i]<=n){
				ans++;
			}
		} {
			if(nums[i]<=n){
				ans++;
			}
		} if(nums[i]<=n){
				ans++;
			} nums[i]<=n nums[i] nums i n {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		int nums[] = {105, 135, 165, 189, 195};
		int ans = 0;

		for(int i=0; i<5; i++){
			if(nums[i]<=n){
				ans++;
			}
		}
		System.out.println(ans);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		int nums[] = {105, 135, 165, 189, 195};
		int ans = 0;

		for(int i=0; i<5; i++){
			if(nums[i]<=n){
				ans++;
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		int nums[] = {105, 135, 165, 189, 195};
		int ans = 0;

		for(int i=0; i<5; i++){
			if(nums[i]<=n){
				ans++;
			}
		}
		System.out.println(ans);
	}
}