#include <iostream>
#include <vector>

using namespace std ;

int main(){
	int n,cou=0 ;
	cin >> n ;

	/*üÍª1ÈºÈçÎfÍÈµ*/
	if(n <= 1){ return 0 ; }

	/*zñÉQðüêé*/
	vector<int> num ;
	num.push_back(2) ;

/*zñÉüÍµ½ÜÅÌïðüêé*/
	for(int i = 3 ; i <= n ; i+=2){
		num.push_back(i) ;
	}

	/*zñÌfÈOÌªÉ0ðüêé*/
	for(int i = 3 ; i <= n ; i+=2) {
		if(num[i/2] != 0){
			for(int j = 3 ; i * j <= n ; j+=2) {
				num[(i*j)/2] = 0 ;
				cou++;
			}
		}
	}

	/*0ÈOð\¦ifÌ\¦j*/
	
	cout << num.size()-cou << endl;
	
	return 0 ;
}