#define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;

int yakusuu(int i){
	int counter=0;
	for (int j = 1; j <= i; j++){
		if (i%j == 0) counter++;
	}
	return counter;
}


int main()
{
	int n;
	while (scanf("%d",&n)!=-1)
	{
		int counter1 = 0;
		for (int i = 2; i <= n; i++)
		{
			if (yakusuu(i) == 2) counter1++;
		}
			cout << counter1 << endl;
	}
	return 0;
}