#include<iostream>
using namespace std;

int main()
{
	int n[30];
	int i = 0;
	while(cin >> n[i]) {i++;}
		
	for (int k = 0;k < i;k++){
		int s = 0;
		for (int j=3;j<=n[k];j++){
			int y = 0;
			for (int m=1;m<=j;m++){
				if (j%m == 0){y++;}
			}
			if (y == 2){s++;}
		}
		cout << s << endl;
	}	
    return 0;
}