Imports System
Module ABC106B
	Function Count(ByVal n As Integer) As Integer
		Dim cnt As Integer = 0
		For i As Integer = 1 To n
			If n Mod i = 0
				cnt += 1
			End IF
		Next
		Return cnt
	End Function

	Sub Main()
		Dim n As Integer = Integer.Parse(Console.ReadLine())
		Dim ans As Integer = 0
		
		For i As Integer = 1 To n
			If i Mod 2 = 0
				Continue For
			End If
			If Count(i) = 8
				ans += 1
			End If
		Next
		Console.WriteLine(ans)
	End Sub
End Module
