# ABC106B - 105

n = int(eval(input()))

odd = []

odd_divs = []



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

    if i % 2 == 1:

        odd.append(i)

        

for i in range(len(odd)):

    count = 0

    for j in range(1, odd[i] + 1):

        if odd[i] % j == 0:

            count += 1            

    odd_divs.append(count)

    

print((odd_divs.count(8)))
# ABC106B - 105

def divisors(x: int) -> set:

    """

    Compute divisors of a number.

    

    Args: x (int): an integer to be evaluated.

    Returns: divs (set): set of divisors

    """

    divs = set()

    for i in range(1, int(x ** 0.5) + 1):

        if x % i == 0:

            divs.add(i), divs.add(x // i)

    return divs





def main():

    N = int(eval(input()))

    ans = sum(len(divisors(i)) == 8 for i in range(1, N + 1, 2))

    print(ans)





if __name__ == "__main__":

    main()
# ABC106B - 105
n = int(eval(input()))
odd = []
odd_divs = []
for i in range(1, n + 1):
    if i % 2 == 1:
        odd.append(i)
for i in range(len(odd)):
    count = 0
    for j in range(1, odd[i] + 1):
        if odd[i] % j == 0:
            count += 1
    odd_divs.append(count)
print((odd_divs.count(8)))

# ABC106B - 105
def divisors(x: int) -> set:
    """
    Compute divisors of a number.
    Args: x (int): an integer to be evaluated.
    Returns: divs (set): set of divisors
    """
    divs = set()
    for i in range(1, int(x**0.5) + 1):
        if x % i == 0:
            divs.add(i), divs.add(x // i)
    return divs


def main():
    N = int(eval(input()))
    ans = sum(len(divisors(i)) == 8 for i in range(1, N + 1, 2))
    print(ans)


if __name__ == "__main__":
    main()

-n = int(eval(input())) -odd = [] -odd_divs = [] -for i in range(1, n + 1): -    if i % 2 == 1: -        odd.append(i) -for i in range(len(odd)): -    count = 0 -    for j in range(1, odd[i] + 1): -        if odd[i] % j == 0: -            count += 1 -    odd_divs.append(count) -print((odd_divs.count(8))) +def divisors(x: int) -> set: +    """ +    Compute divisors of a number. +    Args: x (int): an integer to be evaluated. +    Returns: divs (set): set of divisors +    """ +    divs = set() +    for i in range(1, int(x**0.5) + 1): +        if x % i == 0: +            divs.add(i), divs.add(x // i) +    return divs + + +def main(): +    N = int(eval(input())) +    ans = sum(len(divisors(i)) == 8 for i in range(1, N + 1, 2)) +    print(ans) + + +if __name__ == "__main__": +    main()