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

#pragma warning(disable:4996)

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

	Total = 0;
	DataSet = 0;


	for (DataSet = 0; DataSet <= 30; DataSet++)
	{
		scanf("%d", &In);
		Total = 0;
		for (nCnt = 2; nCnt <= In; nCnt++)
		{
			Count = 0;
			for (nCnt2 = nCnt; nCnt2 >= 2; nCnt2--)
			{
				if (nCnt%nCnt2 == 0)
				{
					if (nCnt != nCnt2)
					{
						Count++;
						break;
					}
				}
			}
			if (Count == 0)
				Total++;
		}
		printf("%d\n", Total);
	}

	return 0;
}