A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.

Input

Input contains one integer number n (1 ≤ n ≤ 3000).

Output

Output the amount of almost prime numbers between 1 and n, inclusive.

Examples

Input

10


Output

2


Input

21


Output

8
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.SortedSet;
import java.util.TreeSet;

/**
 * Created by rakshit on 9/2/17.
 * Java is Love , 4 Forces.. :)
 */
public class Almost {

    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }
    public static void main(String args[]) throws IOException
    {
        OutputStream outputstream=System.out;
        Reader in=new Reader();
        PrintWriter out=new PrintWriter (outputstream);
        Task solver=new Task();
        solver.solve(in,out);
        in.close();
    }

    static class Task
    {
        public final int k=100000;
        public void solve(Reader in , PrintWriter out) throws IOException
        {
            int n=in.nextInt();
            int a[]=new int [n];

            for(int i=0;i<n;i++)
            {
                a[i]=i+1;
            }

            int res=0;
            for(int i=0;i<n;i++)
            {
                if(count(a[i]))
                {
                    res++;
            //        out.println(a[i]);
                }
            }

            out.println(res);

            out.flush();
        }

        public static long max(long a,long b)
        {
            if(a>b)
            {
                return a;
            }
            else
            {
                return b;
            }
        }

        private static long gcd(long a,long b)
        {
            if(a==0)
                return b;
            else
                return gcd(b%a,a);
        }

        private static long lcm(long a, long b)
        {
            return (a*b)/gcd(a,b);
        }

        private static boolean count(int n)
        {
            int res=0;
            if(prime(n))
            {
                return false;
            }
            else
            {
                SortedSet<Integer>check=new TreeSet<>();
                for(int i=2;i<=(int)Math.sqrt(n) ;i++)
                {
                    if(n%i==0)
                    {
                        if(prime(i))
                        {
                            check.add(i);
                        }
                        if(prime(n/i))
                        {
                            check.add(n/i);
                        }
                    }
                }

                if(check.size()==2)
                {
                    return true;
                }
                else
                    return false;
            }
        }

        private static boolean prime(int n)
        {
            if(n==1 || (n%2==0 && n!=2))
                return false;
            else if(n==2 || n==3)
            {
                return true;
            }
            else
            {
                int res=0;
                for(int i=3;i<=(int)Math.sqrt(n) ;i+=2)
                {
                    if(n%i==0)
                    {
                        res++;
                        break;
                    }
                }

                if(res>0)
                {
                    return false;
                }
                else
                {
                    return true;
                }
            }
        }
    }
}