main :: IO ()
main = do
    n <- fmap read getLine :: IO Int
    print $ length [ i | i <- [1 .. n], odd i, judge i ]

judge :: Int -> Bool
judge n = length [ i | i <- [1 .. n], n `mod` i == 0 ] == 8
