#include  <iostream >
    using  namespace  std;

    int  main()
    {
    	
    	for (int i=0; i<=30; i++)
    	{
    	
        int  N;
        cin  >>  N;
        
        
        int count = 0;
        for (int  i =  1;  i <= N;  ++i)
        {
            bool  isPrime  =  true ;
            for (int  j =  2;  j < i;  ++j)
            {
                if (i  % j ==  0)
                {
                    isPrime  =  false ;
                    break ;
                }
            }
            if (isPrime)
            {
                --N;
                count++;
                
            }
        }
    
        cout << count << endl;
		}
        return  0;
    }