#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
#include <string>

using namespace std;


int main(){
	int n = 0;
	int count;
	bool flag = false;
	while(cin >> n){
		count = 0;
		for(int i = 1; i <= n; i++){
			if(i < 2);
			else if(i == 2){
				count++;
			}
			else if(i % 2 != 0){
				for(int j = 3; j * j <= i; j += 2){
					if(i % j == 0){
						flag = true;
						break;
					}
				}
				if(flag != true){
					count++;
				}
				flag = false;
			}
		}

		cout << count << endl;

	}

	return 0;
}