#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;


bool isPrime( int n ) {
	for( int i = 2; i * i <= n; i++ ) {
		if( n % i == 0 ) return false;
	}
	return true;
}


int main(void){


	int n;
	while( scanf("%d", &n) != EOF ) {

		int cnt = 0;
		for( int i = 2; i <= n; i++ )
			if( isPrime(i) )
				cnt ++;
		cout << cnt << endl;

	}

    return 0;
}