#include<iostream>
int r(int n){if(n<2)return 0;else if(n==2)return 1;if((n&1)==0)return 0;for(int i=3;i*i<=n;i+=2)if(n%i==0)return 0;return 1;}int main(){int n,s,i,p;for(;!(std::cin>>n).eof();){for(i=p=0;i++<=n;)p+=r(i);printf("%d\n",p);}}