Imports System.Collections.Generic

Module Module1
    Dim ans As Long = 0

    Function judge(n As Long) As Long
        Dim dic As New HashSet(Of Long)
        Dim res As Long = 0
        Dim i = 1

        Do While i ^ 2 <= n
            If n Mod i = 0 Then
                dic.Add(i)
                dic.Add(n \ i)
            End If
            i = i + 1
        Loop

        If dic.Count = 8 Then res = 1
        Return res
    End Function

    Sub Main()
        Dim N As Long = Console.ReadLine()

        For i As Long = 1 To N Step 2
            ans = ans + judge(i)
        Next

        Console.WriteLine(ans)
    End Sub

End Module