#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <stdint.h>
using namespace std;

bool is_prime(int x)
{
  for (int i = 2; i <= round(sqrt(x)) && i < x; i++)
    if (x % i == 0) return false;
  return true;
}

int main()
{
  for (int n; cin >> n; ) {
    int ans = 0;
    for (int i = 2; i <= n; i++)
      if (is_prime(i))
        ans++;
    cout << ans << endl;
  }

  return 0;
}