#include <cstdio>

using namespace std;

int main() {
	long n, m;
	int flag;
	long counter;

	long i, len;
	
    while (scanf("%ld", &n) != EOF) {
        counter = 0;
        m = 2;
        
        while (m <= n) {
            flag = 0;
            len = m / 2;
    
            for(i = 2; i <= len; i++) {
                if(m % i == 0) {
                    flag = 1;
                    
                    break;
                }
            }
    
            if (flag == 0) counter++;
    
            m++;
        }
        
        printf("%ld\n", counter);
    }

    return 0;
}