
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int n=gi();

        //System.out.println("No");
        
        int c=0;
        for (int i=1; i<=n; i+=2) {
			if (yakusuC(i)==8) {
				c++;
			}
		}


        System.out.print(c);
	}
	
	public static int yakusuC(int n) {
		StringBuilder sb = new StringBuilder();
		int c=0;
		for (int i=1; i<=n; i++) {
			if (n%i==0) {
				c++;
			}
		}

		return c;
	}


	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int n=gi();

        //System.out.println("No");
        
        int c=0;
        for (int i=1; i<=n; i+=2) {
			if (yakusuC(i)==8) {
				c++;
			}
		}


        System.out.print(c);
	}
	
	public static int yakusuC(int n) {
		StringBuilder sb = new StringBuilder();
		int c=0;
		for (int i=1; i<=n; i++) {
			if (n%i==0) {
				c++;
			}
		}

		return c;
	}


	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} Main static Scanner scanner; scanner public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int n=gi();

        //System.out.println("No");
        
        int c=0;
        for (int i=1; i<=n; i+=2) {
			if (yakusuC(i)==8) {
				c++;
			}
		}


        System.out.print(c);
	} main {
	    scanner = new Scanner(System.in);

        int n=gi();

        //System.out.println("No");
        
        int c=0;
        for (int i=1; i<=n; i+=2) {
			if (yakusuC(i)==8) {
				c++;
			}
		}


        System.out.print(c);
	} scanner = new Scanner(System.in) scanner new Scanner(System.in) int n=gi(); n gi() gi int c=0; c 0 for (int i=1; i<=n; i+=2) {
			if (yakusuC(i)==8) {
				c++;
			}
		} int i=1; int i=1; i 1 i<=n i n i+=2 i+=2 i 2 {
			if (yakusuC(i)==8) {
				c++;
			}
		} {
			if (yakusuC(i)==8) {
				c++;
			}
		} if (yakusuC(i)==8) {
				c++;
			} yakusuC(i)==8 yakusuC(i) yakusuC i 8 {
				c++;
			} c++ c System.out.print(c) System.out.print System.out System System.out c String[] args args public static int yakusuC(int n) {
		StringBuilder sb = new StringBuilder();
		int c=0;
		for (int i=1; i<=n; i++) {
			if (n%i==0) {
				c++;
			}
		}

		return c;
	} yakusuC {
		StringBuilder sb = new StringBuilder();
		int c=0;
		for (int i=1; i<=n; i++) {
			if (n%i==0) {
				c++;
			}
		}

		return c;
	} StringBuilder sb = new StringBuilder(); sb new StringBuilder() int c=0; c 0 for (int i=1; i<=n; i++) {
			if (n%i==0) {
				c++;
			}
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			if (n%i==0) {
				c++;
			}
		} {
			if (n%i==0) {
				c++;
			}
		} if (n%i==0) {
				c++;
			} n%i==0 n%i n i 0 {
				c++;
			} c++ c return c; c int n n public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	} d {
		String a=String.valueOf(n);
		return (long)a.length();
	} String a=String.valueOf(n); a String.valueOf(n) String.valueOf String n return (long)a.length(); (long)a.length() a.length a long n n // 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	} gs {
		return scanner.next();
	} return scanner.next(); scanner.next() scanner.next scanner // intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	} gi {
		return Integer.parseInt(scanner.next());
	} return Integer.parseInt(scanner.next()); Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner // longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	} gl {
		return Long.parseLong(scanner.next());
	} return Long.parseLong(scanner.next()); Long.parseLong(scanner.next()) Long.parseLong Long scanner.next() scanner.next scanner // doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	} gd {
		return Double.parseDouble(scanner.next());
	} return Double.parseDouble(scanner.next()); Double.parseDouble(scanner.next()) Double.parseDouble Double scanner.next() scanner.next scanner public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int n=gi();

        //System.out.println("No");
        
        int c=0;
        for (int i=1; i<=n; i+=2) {
			if (yakusuC(i)==8) {
				c++;
			}
		}


        System.out.print(c);
	}
	
	public static int yakusuC(int n) {
		StringBuilder sb = new StringBuilder();
		int c=0;
		for (int i=1; i<=n; i++) {
			if (n%i==0) {
				c++;
			}
		}

		return c;
	}


	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int n=gi();

        //System.out.println("No");
        
        int c=0;
        for (int i=1; i<=n; i+=2) {
			if (yakusuC(i)==8) {
				c++;
			}
		}


        System.out.print(c);
	}
	
	public static int yakusuC(int n) {
		StringBuilder sb = new StringBuilder();
		int c=0;
		for (int i=1; i<=n; i++) {
			if (n%i==0) {
				c++;
			}
		}

		return c;
	}


	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} Main

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int n=gi();

        //System.out.println("No");
        
        int c=0;
        for (int i=1; i<=n; i+=2) {
			if (yakusuC(i)==8) {
				c++;
			}
		}


        System.out.print(c);
	}
	
	public static int yakusuC(int n) {
		StringBuilder sb = new StringBuilder();
		int c=0;
		for (int i=1; i<=n; i++) {
			if (n%i==0) {
				c++;
			}
		}

		return c;
	}


	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
}