#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#pragma warning(disable:4996)

int main()
{
	int nCnt,nCnt2,In,Total,Count;

	Total = 0;

	scanf("%d", &In);

	for (nCnt = 2; nCnt <= In; nCnt++)
	{
		Count = 0;
		for (nCnt2 = nCnt; nCnt2 >= 2; nCnt2--)
		{
			if (nCnt%nCnt2 == 0)
			{
				if (nCnt != nCnt2)
					Count++;
			}
		}
		if (Count == 0)
			Total++;
	}

	printf("%d\n", Total);

	return 0;
}