import sys

from itertools import combinations

import math





def I(): return int(sys.stdin.readline().rstrip())





def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))





def S(): return sys.stdin.readline().rstrip()





def LS(): return list(sys.stdin.readline().rstrip().split())





N = I()

ans = 0

if N >= 105:

    for i in range(105, N+1, 2):

        yakusu = 0

        for q in range(1, N+1):

            if i % q == 0:

                yakusu += 1

        if yakusu == 8:

            ans += 1

print(ans)

import sys



def I(): return int(sys.stdin.readline().rstrip())

def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

def S(): return sys.stdin.readline().rstrip()

def LS(): return list(sys.stdin.readline().rstrip().split())



n = I()

ans = 0

if n < 105:

    print((0))

    exit

else:

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

        cnt = 0

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

            if i % q == 0:

                cnt += 1

        if cnt == 8:

            ans += 1

    print(ans)
import sys
from itertools import combinations
import math


def I():
    return int(sys.stdin.readline().rstrip())


def LI():
    return list(map(int, sys.stdin.readline().rstrip().split()))


def S():
    return sys.stdin.readline().rstrip()


def LS():
    return list(sys.stdin.readline().rstrip().split())


N = I()
ans = 0
if N >= 105:
    for i in range(105, N + 1, 2):
        yakusu = 0
        for q in range(1, N + 1):
            if i % q == 0:
                yakusu += 1
        if yakusu == 8:
            ans += 1
print(ans)

import sys


def I():
    return int(sys.stdin.readline().rstrip())


def LI():
    return list(map(int, sys.stdin.readline().rstrip().split()))


def S():
    return sys.stdin.readline().rstrip()


def LS():
    return list(sys.stdin.readline().rstrip().split())


n = I()
ans = 0
if n < 105:
    print((0))
    exit
else:
    for i in range(105, n + 1, 2):
        cnt = 0
        for q in range(1, i + 1):
            if i % q == 0:
                cnt += 1
        if cnt == 8:
            ans += 1
    print(ans)

-from itertools import combinations -import math -N = I() +n = I() -if N >= 105: -    for i in range(105, N + 1, 2): -        yakusu = 0 -        for q in range(1, N + 1): +if n < 105: +    print((0)) +    exit +else: +    for i in range(105, n + 1, 2): +        cnt = 0 +        for q in range(1, i + 1): -                yakusu += 1 -        if yakusu == 8: +                cnt += 1 +        if cnt == 8: -print(ans) +    print(ans)