#include <iostream>

bool Check(int);

int main(void)
{
    int input;
    int count;
    for(int i=0;i < 30;++i){
        std::cin >> input;
        count = 0;
        for(int j=2;j <= input;++j){
            if(Check(j)){
                ++count;
            }
        }
        std::cout << count << std::endl;
    }
    return 0;
}
bool Check(int value)
{
    bool result = true;
    for(int i=value / 2;i >= 2;--i){
        if(value % i == 0){
            result = false;
            break;
        }
    }
    return result;
}