#include <bits/stdc++.h>
using namespace std;
#define task "SLNT"
bool p(long a)
{
	if (a<2) return false;
	if (a>2)
	{
		for (int i=2;i<=sqrt(a),i++)
		{
			if (a%i==0)
			{
				return false;
				break;
			}
		}
	}
	return true;
}
int main ()
{
	freopen(task ".inp","r",stdin);
	freopen(task ".out","w",stdout);
	long  a,d=0;
	cin>>a;
	for (long b=2;b<=a;b++)
	{
		if (p(b)==true)
		{
			d=d+1;
		}
	}
	cout<<d;
}
