import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int count = 0;
        int tmp;
        int tmp2;
        int elemCount;
        HashSet<Integer> b = new HashSet<Integer>();
        if (a<105) {
        	System.out.println(count);
        }else {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        }

        //int[] sosuu = {3 ,5 ,7 ,11 ,13};
        /*
         * 3,5,7   = 105 # 3,5,7,15,21,35
         * 3,3,3,5 = 135 # 3,5,9,15,27,45
         * 3,3,5,5 = 225 X
         * 3,5,11  = 165 # 3,5,11,15,33,55
         * 3,3,3,7 = 175
         * 3,5,13  = 195 # 3,5,13,15,39,65
         * 5,7,11  = 385 X
         */
        /*
        if (a < 105) {
        	System.out.println(0);
        }else if(a < 135) {
        	System.out.println(1);
        }else if(a < 165) {
        	System.out.println(2);
        }else if(a < 175) {
        	System.out.println(3);
        }else if(a < 195) {
        	System.out.println(4);
        }else {
        	System.out.println(5);
        }
        */

    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashSet; HashSet java.util public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int count = 0;
        int tmp;
        int tmp2;
        int elemCount;
        HashSet<Integer> b = new HashSet<Integer>();
        if (a<105) {
        	System.out.println(count);
        }else {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        }

        //int[] sosuu = {3 ,5 ,7 ,11 ,13};
        /*
         * 3,5,7   = 105 # 3,5,7,15,21,35
         * 3,3,3,5 = 135 # 3,5,9,15,27,45
         * 3,3,5,5 = 225 X
         * 3,5,11  = 165 # 3,5,11,15,33,55
         * 3,3,3,7 = 175
         * 3,5,13  = 195 # 3,5,13,15,39,65
         * 5,7,11  = 385 X
         */
        /*
        if (a < 105) {
        	System.out.println(0);
        }else if(a < 135) {
        	System.out.println(1);
        }else if(a < 165) {
        	System.out.println(2);
        }else if(a < 175) {
        	System.out.println(3);
        }else if(a < 195) {
        	System.out.println(4);
        }else {
        	System.out.println(5);
        }
        */

    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
} Main public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    } main {
        Main main = new Main();
        main.solve(args);
    } Main main = new Main(); main new Main() main.solve(args) main.solve main args String[] args args public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int count = 0;
        int tmp;
        int tmp2;
        int elemCount;
        HashSet<Integer> b = new HashSet<Integer>();
        if (a<105) {
        	System.out.println(count);
        }else {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        }

        //int[] sosuu = {3 ,5 ,7 ,11 ,13};
        /*
         * 3,5,7   = 105 # 3,5,7,15,21,35
         * 3,3,3,5 = 135 # 3,5,9,15,27,45
         * 3,3,5,5 = 225 X
         * 3,5,11  = 165 # 3,5,11,15,33,55
         * 3,3,3,7 = 175
         * 3,5,13  = 195 # 3,5,13,15,39,65
         * 5,7,11  = 385 X
         */
        /*
        if (a < 105) {
        	System.out.println(0);
        }else if(a < 135) {
        	System.out.println(1);
        }else if(a < 165) {
        	System.out.println(2);
        }else if(a < 175) {
        	System.out.println(3);
        }else if(a < 195) {
        	System.out.println(4);
        }else {
        	System.out.println(5);
        }
        */

    } solve {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int count = 0;
        int tmp;
        int tmp2;
        int elemCount;
        HashSet<Integer> b = new HashSet<Integer>();
        if (a<105) {
        	System.out.println(count);
        }else {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        }

        //int[] sosuu = {3 ,5 ,7 ,11 ,13};
        /*
         * 3,5,7   = 105 # 3,5,7,15,21,35
         * 3,3,3,5 = 135 # 3,5,9,15,27,45
         * 3,3,5,5 = 225 X
         * 3,5,11  = 165 # 3,5,11,15,33,55
         * 3,3,3,7 = 175
         * 3,5,13  = 195 # 3,5,13,15,39,65
         * 5,7,11  = 385 X
         */
        /*
        if (a < 105) {
        	System.out.println(0);
        }else if(a < 135) {
        	System.out.println(1);
        }else if(a < 165) {
        	System.out.println(2);
        }else if(a < 175) {
        	System.out.println(3);
        }else if(a < 195) {
        	System.out.println(4);
        }else {
        	System.out.println(5);
        }
        */

    } MyScanner scanner = new MyScanner(); scanner new MyScanner() int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 int tmp; tmp int tmp2; tmp2 int elemCount; elemCount HashSet<Integer> b = new HashSet<Integer>(); b new HashSet<Integer>() if (a<105) {
        	System.out.println(count);
        }else {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        } a<105 a 105 {
        	System.out.println(count);
        } System.out.println(count) System.out.println System.out System System.out count {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        } for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	} int i=105; int i=105; i 105 i<=a i a i++ i++ i {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	} {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	} if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		} i%2 != 0 i%2 i 2 0 {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		} b=new HashSet<Integer>() b new HashSet<Integer>() elemCount = 0 elemCount 0 tmp = 3 tmp 3 tmp2 = i tmp2 i while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			} tmp2 != 1 tmp2 1 {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			} if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    } tmp2%tmp == 0 tmp2%tmp tmp2 tmp 0 {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    } b.add(tmp) b.add b tmp elemCount++ elemCount tmp2 /= tmp tmp2 tmp {
        			    	tmp+=2;
        			    } tmp+=2 tmp 2 if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			} (b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4) (b.size()==3&&elemCount==3) b.size()==3 b.size() b.size b 3 elemCount==3 elemCount 3 (b.size()==2&&elemCount==4) b.size()==2 b.size() b.size b 2 elemCount==4 elemCount 4 {
        				count++;
        			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    } MyScanner String[] s; s int i; i BufferedReader br; br String reg = " "; reg " " MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        } MyScanner {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        } s = new String[0] s new String[0] 0 i = 0 i 0 br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        } next {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        } try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();} Exception e {e.printStackTrace();} e.printStackTrace() e.printStackTrace e {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } if (i < s.length) return s[i++]; i < s.length i s.length s s.length return s[i++]; s[i++] s i++ i String line = br.readLine(); line br.readLine() br.readLine br while (line.equals("")) {line = br.readLine();} line.equals("") line.equals line "" {line = br.readLine();} line = br.readLine() line br.readLine() br.readLine br s = line.split(reg, 0) s line.split(reg, 0) line.split line reg 0 i = 0 i 0 return s[i++]; s[i++] s i++ i return null; null public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } nextInt {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();} Exception e {e.printStackTrace();} e.printStackTrace() e.printStackTrace e {return Integer.parseInt(next());} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next return -1; -1 1 public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } nextDouble {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();} Exception e {e.printStackTrace();} e.printStackTrace() e.printStackTrace e {return Double.parseDouble(next());} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next return -1; -1 1 public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } nextLong {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();} Exception e {e.printStackTrace();} e.printStackTrace() e.printStackTrace e {return Long.parseLong(next());} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next return -1; -1 1 public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int count = 0;
        int tmp;
        int tmp2;
        int elemCount;
        HashSet<Integer> b = new HashSet<Integer>();
        if (a<105) {
        	System.out.println(count);
        }else {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        }

        //int[] sosuu = {3 ,5 ,7 ,11 ,13};
        /*
         * 3,5,7   = 105 # 3,5,7,15,21,35
         * 3,3,3,5 = 135 # 3,5,9,15,27,45
         * 3,3,5,5 = 225 X
         * 3,5,11  = 165 # 3,5,11,15,33,55
         * 3,3,3,7 = 175
         * 3,5,13  = 195 # 3,5,13,15,39,65
         * 5,7,11  = 385 X
         */
        /*
        if (a < 105) {
        	System.out.println(0);
        }else if(a < 135) {
        	System.out.println(1);
        }else if(a < 165) {
        	System.out.println(2);
        }else if(a < 175) {
        	System.out.println(3);
        }else if(a < 195) {
        	System.out.println(4);
        }else {
        	System.out.println(5);
        }
        */

    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
} public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int count = 0;
        int tmp;
        int tmp2;
        int elemCount;
        HashSet<Integer> b = new HashSet<Integer>();
        if (a<105) {
        	System.out.println(count);
        }else {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        }

        //int[] sosuu = {3 ,5 ,7 ,11 ,13};
        /*
         * 3,5,7   = 105 # 3,5,7,15,21,35
         * 3,3,3,5 = 135 # 3,5,9,15,27,45
         * 3,3,5,5 = 225 X
         * 3,5,11  = 165 # 3,5,11,15,33,55
         * 3,3,3,7 = 175
         * 3,5,13  = 195 # 3,5,13,15,39,65
         * 5,7,11  = 385 X
         */
        /*
        if (a < 105) {
        	System.out.println(0);
        }else if(a < 135) {
        	System.out.println(1);
        }else if(a < 165) {
        	System.out.println(2);
        }else if(a < 175) {
        	System.out.println(3);
        }else if(a < 195) {
        	System.out.println(4);
        }else {
        	System.out.println(5);
        }
        */

    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int count = 0;
        int tmp;
        int tmp2;
        int elemCount;
        HashSet<Integer> b = new HashSet<Integer>();
        if (a<105) {
        	System.out.println(count);
        }else {
        	for (int i=105;i<=a;i++) {
        		if(i%2 != 0) {
        			b=new HashSet<Integer>();
        			elemCount = 0;
        			tmp = 3;
        			tmp2 = i;
        			while(tmp2 != 1) {
        			    if(tmp2%tmp == 0) {
        			          b.add(tmp);
        			          elemCount++;
        			          tmp2 /= tmp;
        			    }
        			    else {
        			    	tmp+=2;
        			    }
        			}
        			if((b.size()==3&&elemCount==3)||(b.size()==2&&elemCount==4)) {
        				count++;
        			}

        		}
        	}
        	System.out.println(count);
        }

        //int[] sosuu = {3 ,5 ,7 ,11 ,13};
        /*
         * 3,5,7   = 105 # 3,5,7,15,21,35
         * 3,3,3,5 = 135 # 3,5,9,15,27,45
         * 3,3,5,5 = 225 X
         * 3,5,11  = 165 # 3,5,11,15,33,55
         * 3,3,3,7 = 175
         * 3,5,13  = 195 # 3,5,13,15,39,65
         * 5,7,11  = 385 X
         */
        /*
        if (a < 105) {
        	System.out.println(0);
        }else if(a < 135) {
        	System.out.println(1);
        }else if(a < 165) {
        	System.out.println(2);
        }else if(a < 175) {
        	System.out.println(3);
        }else if(a < 195) {
        	System.out.println(4);
        }else {
        	System.out.println(5);
        }
        */

    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
}