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