local n=io.read("n")
local counter=0
for i=1,n,2 do
    local div=0
    for j=1,i do
        if i%j==0 then
            div=div+1
        end
    end
    if div==8 then
        counter=counter+1
    end
end
print(counter)