/* All men have limits. They learn what they are and learn
   not to exceed them, I ignore mine. -Batman           */
#include <bits/stdc++.h>
//#include <iostream>
//#include <Windows.h>
using namespace std;
bool prime(int n){
	if(n==0||n==1)return 0;
	else if(n==2)return 1;
	else
	for(int i=2;i<=sqrt(n);i++){
		if(n%i==0)return 0;
	}
	return 1;
	
}

int main(){int n;
while(cin>>n){int ans(0);
for(int i=1;i<=n;i++){
	if(prime(i))ans++;
}
	cout<<ans<<endl;

}

return 0;
}