#include <stdio.h>

int main(){

	int a[99999] = {2,3,5},i,n,m=0,b=3,c=0;
	while (scanf("%d",&n)!=EOF){
		for (i = 2; i < n+1; i++){
			if (i % a[m] == 0){
				a[b] = i, b++, c++;
				}
		}printf("%d\n", c);
		}
	return 0;
}