#include <iostream>
using namespace std;

int main(void)
{
    int count=0;
    int i=1;
    int n=1;
    int number;
    int a[30]={0};
    int j=0;
    // insert code here...
    while (cin >> number){
        while (n <= number){
            if(n == 1) {n++; continue;}
            while (i <= n) {
                if(i == 1) {i++; continue;}
                if(i == n) count++;
                if(n % i == 0) break;
                i++;
            }
            n++;
            i=1;
            
        }
        i=1;
        n=1;
        j++;
        a[j] = count;
    }
    
    for(int i=0;i<j;i++){
        cout << a[j] << endl;
    }
    return 0;
}