var input = require('fs').readFileSync('/dev/stdin', 'utf8').trim();
var lines = input.split('\n');

lines.forEach(function(line) {
  var count = 0;
  for(var i = 2; i <= line; i++) {
    if(isNumberPrime(i)) {
      count++;
    }
  }
  console.log(count);
});


function isNumberPrime(value) {
    var number = parseInt(value, 10);
    for(var i = 2; i < number; i++) {
        if(number % i === 0) {
            return false;
        }
    }
    return number > 1;
}