import java.util.Scanner;
public class Main {
    static int isPerfectNumber(int num) {
        int sum = 1;
        for(int i = 1; i <= num / 2; i++) {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        }
        return sum;
    }
	public void run() throws Exception {
		int anw = 0;

	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int cont = 0;
	    for(int i=1;i<=N;i++){
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    }
	    


	    System.out.println(cont);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

} import java.util.Scanner; Scanner java.util public class Main {
    static int isPerfectNumber(int num) {
        int sum = 1;
        for(int i = 1; i <= num / 2; i++) {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        }
        return sum;
    }
	public void run() throws Exception {
		int anw = 0;

	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int cont = 0;
	    for(int i=1;i<=N;i++){
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    }
	    


	    System.out.println(cont);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

} Main static int isPerfectNumber(int num) {
        int sum = 1;
        for(int i = 1; i <= num / 2; i++) {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        }
        return sum;
    } isPerfectNumber {
        int sum = 1;
        for(int i = 1; i <= num / 2; i++) {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        }
        return sum;
    } int sum = 1; sum 1 for(int i = 1; i <= num / 2; i++) {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        } int i = 1; int i = 1; i 1 i <= num / 2 i num / 2 num 2 i++ i++ i {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        } {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        } if(num % i == 0) {
               // sum += i;
            	++sum;
            } num % i == 0 num % i num i 0 {
               // sum += i;
            	++sum;
            } ++sum sum return sum; sum int num num public void run() throws Exception {
		int anw = 0;

	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int cont = 0;
	    for(int i=1;i<=N;i++){
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    }
	    


	    System.out.println(cont);
	} run {
		int anw = 0;

	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int cont = 0;
	    for(int i=1;i<=N;i++){
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    }
	    


	    System.out.println(cont);
	} int anw = 0; anw 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int cont = 0; cont 0 for(int i=1;i<=N;i++){
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    } {
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    } anw = isPerfectNumber(i) anw isPerfectNumber(i) isPerfectNumber i if(anw == 8 && i%2==1){
	    		++cont;
	    	} anw == 8 && i%2==1 anw == 8 anw 8 i%2==1 i%2 i 2 1 {
	    		++cont;
	    	} ++cont cont System.out.println(cont) System.out.println System.out System System.out cont public static void main(String[] args) throws Exception {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {
    static int isPerfectNumber(int num) {
        int sum = 1;
        for(int i = 1; i <= num / 2; i++) {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        }
        return sum;
    }
	public void run() throws Exception {
		int anw = 0;

	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int cont = 0;
	    for(int i=1;i<=N;i++){
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    }
	    


	    System.out.println(cont);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

} public class Main {
    static int isPerfectNumber(int num) {
        int sum = 1;
        for(int i = 1; i <= num / 2; i++) {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        }
        return sum;
    }
	public void run() throws Exception {
		int anw = 0;

	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int cont = 0;
	    for(int i=1;i<=N;i++){
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    }
	    


	    System.out.println(cont);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

} Main
import java.util.Scanner;
public class Main {
    static int isPerfectNumber(int num) {
        int sum = 1;
        for(int i = 1; i <= num / 2; i++) {
            if(num % i == 0) {
               // sum += i;
            	++sum;
            }
        }
        return sum;
    }
	public void run() throws Exception {
		int anw = 0;

	    Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int cont = 0;
	    for(int i=1;i<=N;i++){
	    	anw = isPerfectNumber(i);
	    	if(anw == 8 && i%2==1){
	    		++cont;
	    	}
	    }
	    


	    System.out.println(cont);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

}