#include <bits/stdc++.h>
using namespace std;
int cnt ;
int l (int h)
{
    
    for (int i = 2; i <= h; i ++ )
	{   bool is_prime = true;
		for (int j = 2; j < i ;j ++ )
         	{
		 		if (i % j == 0)
				 {	is_prime = false; 
		 		break;
				 }
	     	}
        if (is_prime == true) 
		cnt++ ;
	}
    return cnt ;
}
int main ()
{
	int h;
	cin >> h ;

	cout << l(h) << endl ;
}

1 comments

  • 1