import java.io.*;

class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Integer inputVal = new Integer(in.readLine());
        Integer outputVal = 0;
        for (int i = 0; i <= inputVal; i++) {
        	if (i % 2 == 0) {
        		continue;
        	}
        	Integer countVal = 0;
        	for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	}
        	if (countVal == 8) {
        		outputVal++;
        	}
        }
        System.out.println(outputVal);
   }
} import java.io.*; io.* java class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Integer inputVal = new Integer(in.readLine());
        Integer outputVal = 0;
        for (int i = 0; i <= inputVal; i++) {
        	if (i % 2 == 0) {
        		continue;
        	}
        	Integer countVal = 0;
        	for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	}
        	if (countVal == 8) {
        		outputVal++;
        	}
        }
        System.out.println(outputVal);
   }
} Main public static void main(String args[]) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Integer inputVal = new Integer(in.readLine());
        Integer outputVal = 0;
        for (int i = 0; i <= inputVal; i++) {
        	if (i % 2 == 0) {
        		continue;
        	}
        	Integer countVal = 0;
        	for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	}
        	if (countVal == 8) {
        		outputVal++;
        	}
        }
        System.out.println(outputVal);
   } main {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Integer inputVal = new Integer(in.readLine());
        Integer outputVal = 0;
        for (int i = 0; i <= inputVal; i++) {
        	if (i % 2 == 0) {
        		continue;
        	}
        	Integer countVal = 0;
        	for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	}
        	if (countVal == 8) {
        		outputVal++;
        	}
        }
        System.out.println(outputVal);
   } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) Integer inputVal = new Integer(in.readLine()); inputVal new Integer(in.readLine()) Integer outputVal = 0; outputVal 0 for (int i = 0; i <= inputVal; i++) {
        	if (i % 2 == 0) {
        		continue;
        	}
        	Integer countVal = 0;
        	for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	}
        	if (countVal == 8) {
        		outputVal++;
        	}
        } int i = 0; int i = 0; i 0 i <= inputVal i inputVal i++ i++ i {
        	if (i % 2 == 0) {
        		continue;
        	}
        	Integer countVal = 0;
        	for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	}
        	if (countVal == 8) {
        		outputVal++;
        	}
        } {
        	if (i % 2 == 0) {
        		continue;
        	}
        	Integer countVal = 0;
        	for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	}
        	if (countVal == 8) {
        		outputVal++;
        	}
        } if (i % 2 == 0) {
        		continue;
        	} i % 2 == 0 i % 2 i 2 0 {
        		continue;
        	} continue; Integer countVal = 0; countVal 0 for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	} int s = 1; int s = 1; s 1 s <= i s i s++ s++ s {
        		if (i % s == 0) {
        			countVal++;
        		}
        	} {
        		if (i % s == 0) {
        			countVal++;
        		}
        	} if (i % s == 0) {
        			countVal++;
        		} i % s == 0 i % s i s 0 {
        			countVal++;
        		} countVal++ countVal if (countVal == 8) {
        		outputVal++;
        	} countVal == 8 countVal 8 {
        		outputVal++;
        	} outputVal++ outputVal System.out.println(outputVal) System.out.println System.out System System.out outputVal String args[] args
import java.io.*;

class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Integer inputVal = new Integer(in.readLine());
        Integer outputVal = 0;
        for (int i = 0; i <= inputVal; i++) {
        	if (i % 2 == 0) {
        		continue;
        	}
        	Integer countVal = 0;
        	for (int s = 1;s <= i;s++) {
        		if (i % s == 0) {
        			countVal++;
        		}
        	}
        	if (countVal == 8) {
        		outputVal++;
        	}
        }
        System.out.println(outputVal);
   }
}