#!/usr/bin/bash

read n;
ans=0
for i in `seq 1 ${n}`
do
    tmp=0
    for j in `seq 1 ${i}`
    do
	if [ $((($i)%($j))) -eq 0 ]; then
	    tmp=$((${tmp}+1))
	fi	
    done
    if [ ${tmp} -eq 8 ]; then
	if [ $(($i%2)) -eq 1 ]; then
	    ans=$((${ans}+1))
	fi
    fi   
done
echo $ans
