// PrimeNumber.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include "stdafx.h"
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
	int n, count,k;

	while(cin >> n){
		count = 1;
		k = 0;

		for(int i = 3; i <= n; i += 2){
			for(int j = 3; j <= sqrt((double)i); j += 2)
			{
				if(i%j == 0){
					k = 1;
					break;
				}
			}
			if(k == 0){
				count++;
			}
		}
		cout << count << endl;
	}

	return 0;
}