#include<iostream>
using namespace std;

int main()
{
	int n[30];
	int i=0;
	while(cin >> n[i]) i++;
		
	for (int k=0;k<i;k++){
		int s=1;
	
		for (int j=3;j<=n[k];j++){
				//judgement of prime number
				for(int m=2;m<j;m++){
					if(j%m==0){break;}
					if(m==j-1){s=s+1;}
				}
		}
	cout << s <<endl;
	}
	
    return 0;
}