import math

import itertools

import numpy as np



def div(n):

    c = 0

    for i in range(1,n+1):

        if n % i == 0:

            c += 1

    return c



def solve():

    n = int(eval(input()))

    ans = 0

    for i in range(1,n+1):

        if div(i) == 8 and i % 2 == 1:

            ans += 1

    print(ans)

    return 0



if __name__ == "__main__":

    solve()

import math

import collections

import fractions

import itertools

import functools

import operator



def yakusu_rekkyo(n):

    lower_divisors , upper_divisors = [], []

    i = 1

    while i*i <= n:

        if n % i == 0:

            lower_divisors.append(i)

            if i != n // i:

                upper_divisors.append(n//i)

        i += 1

    return lower_divisors + upper_divisors[::-1]



def solve():

    n = int(eval(input()))

    cnt = 0

    for i in range(1,n+1):

        hoge = 0

        for j in yakusu_rekkyo(i):

            if j%2 == 1:

                hoge += 1

        if hoge == 8:

            cnt += 1

    print(cnt)

    return 0



if __name__ == "__main__":

    solve()
import math
import itertools
import numpy as np


def div(n):
    c = 0
    for i in range(1, n + 1):
        if n % i == 0:
            c += 1
    return c


def solve():
    n = int(eval(input()))
    ans = 0
    for i in range(1, n + 1):
        if div(i) == 8 and i % 2 == 1:
            ans += 1
    print(ans)
    return 0


if __name__ == "__main__":
    solve()

import math
import collections
import fractions
import itertools
import functools
import operator


def yakusu_rekkyo(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


def solve():
    n = int(eval(input()))
    cnt = 0
    for i in range(1, n + 1):
        hoge = 0
        for j in yakusu_rekkyo(i):
            if j % 2 == 1:
                hoge += 1
        if hoge == 8:
            cnt += 1
    print(cnt)
    return 0


if __name__ == "__main__":
    solve()

+import collections +import fractions -import numpy as np +import functools +import operator -def div(n): -    c = 0 -    for i in range(1, n + 1): +def yakusu_rekkyo(n): +    lower_divisors, upper_divisors = [], [] +    i = 1 +    while i * i <= n: -            c += 1 -    return c +            lower_divisors.append(i) +            if i != n // i: +                upper_divisors.append(n // i) +        i += 1 +    return lower_divisors + upper_divisors[::-1] -    ans = 0 +    cnt = 0 -        if div(i) == 8 and i % 2 == 1: -            ans += 1 -    print(ans) +        hoge = 0 +        for j in yakusu_rekkyo(i): +            if j % 2 == 1: +                hoge += 1 +        if hoge == 8: +            cnt += 1 +    print(cnt)