//
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    
    long in[30];
    long out[30];
    int n = 0;
    while(cin >> in[n]){
        
        long p[1000];
        //int length = sizeof(p) / sizeof(*p);
        int m = 0;
        //printf("length: %d", length);
        for (int i = 2; i <= in[n]; i++) {
            bool prime = true;
            for(int j = 0; j < m; j++){
                if (i % p[j] == 0) {
                    prime = false;
                }
            }
            if (prime) {
                p[m] = i;
                //printf("%ld\n", p[m]);
                m++;
            }
        }
        
        int s = 0;
        while (in[n] >= p[s]) {
            s++;
        }
        out[n] = s;
        n++;
    }
    
    for (int i = 0; i < n; i++) {
        printf("%ld\n", out[i]);
    }
    
    return 0;
}