import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        N = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	int answer = 0;
        int count = 0;
        
        for (int i=1; i<=N; i+=2) {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        }
        
        return answer;
    }
    
    //約数の個数を返すメソッド
    private int divisorCount(int num) {
    	int count = 0;
    	
    	for (int i=1; i<=num; i++) {
    		if (num % i == 0) {
    			count++;
    		}
    	}
    	
    	return count;
    	
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        N = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	int answer = 0;
        int count = 0;
        
        for (int i=1; i<=N; i+=2) {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        }
        
        return answer;
    }
    
    //約数の個数を返すメソッド
    private int divisorCount(int num) {
    	int count = 0;
    	
    	for (int i=1; i<=num; i++) {
    		if (num % i == 0) {
    			count++;
    		}
    	}
    	
    	return count;
    	
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} Main //フィールド
    Scanner sc; sc int N; N public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Main m = new Main(sc); m new Main(sc) m.show(m.solve()) m.show m m.solve() m.solve m sc.close() sc.close sc String[] args args //入力
    Main(Scanner sc) {
        this.sc = sc;
        N = sc.nextInt();
    } Main {
        this.sc = sc;
        N = sc.nextInt();
    } this.sc = sc this.sc this this.sc sc N = sc.nextInt() N sc.nextInt() sc.nextInt sc Scanner sc sc //解答処理
    private int solve() {
    	int answer = 0;
        int count = 0;
        
        for (int i=1; i<=N; i+=2) {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        }
        
        return answer;
    } solve {
    	int answer = 0;
        int count = 0;
        
        for (int i=1; i<=N; i+=2) {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        }
        
        return answer;
    } int answer = 0; answer 0 int count = 0; count 0 for (int i=1; i<=N; i+=2) {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        } int i=1; int i=1; i 1 i<=N i N i+=2 i+=2 i 2 {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        } {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        } count = divisorCount(i) count divisorCount(i) divisorCount i if (count == 8) {
        		answer++;
        	} count == 8 count 8 {
        		answer++;
        	} answer++ answer return answer; answer //約数の個数を返すメソッド
    private int divisorCount(int num) {
    	int count = 0;
    	
    	for (int i=1; i<=num; i++) {
    		if (num % i == 0) {
    			count++;
    		}
    	}
    	
    	return count;
    	
    } divisorCount {
    	int count = 0;
    	
    	for (int i=1; i<=num; i++) {
    		if (num % i == 0) {
    			count++;
    		}
    	}
    	
    	return count;
    	
    } int count = 0; count 0 for (int i=1; i<=num; i++) {
    		if (num % i == 0) {
    			count++;
    		}
    	} int i=1; int i=1; i 1 i<=num i num i++ i++ i {
    		if (num % i == 0) {
    			count++;
    		}
    	} {
    		if (num % i == 0) {
    			count++;
    		}
    	} if (num % i == 0) {
    			count++;
    		} num % i == 0 num % i num i 0 {
    			count++;
    		} count++ count return count; count int num num //出力
    public void show(int answer) {
        System.out.println(answer);
    } show {
        System.out.println(answer);
    } System.out.println(answer) System.out.println System.out System System.out answer int answer answer public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        N = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	int answer = 0;
        int count = 0;
        
        for (int i=1; i<=N; i+=2) {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        }
        
        return answer;
    }
    
    //約数の個数を返すメソッド
    private int divisorCount(int num) {
    	int count = 0;
    	
    	for (int i=1; i<=num; i++) {
    		if (num % i == 0) {
    			count++;
    		}
    	}
    	
    	return count;
    	
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        N = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	int answer = 0;
        int count = 0;
        
        for (int i=1; i<=N; i+=2) {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        }
        
        return answer;
    }
    
    //約数の個数を返すメソッド
    private int divisorCount(int num) {
    	int count = 0;
    	
    	for (int i=1; i<=num; i++) {
    		if (num % i == 0) {
    			count++;
    		}
    	}
    	
    	return count;
    	
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        N = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	int answer = 0;
        int count = 0;
        
        for (int i=1; i<=N; i+=2) {
        	count = divisorCount(i);
        	if (count == 8) {
        		answer++;
        	}
        }
        
        return answer;
    }
    
    //約数の個数を返すメソッド
    private int divisorCount(int num) {
    	int count = 0;
    	
    	for (int i=1; i<=num; i++) {
    		if (num % i == 0) {
    			count++;
    		}
    	}
    	
    	return count;
    	
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

}
