def n0():return int(eval(input()))

def n1():return [int(x) for x in input().split()]

def n2(n):return [int(eval(input())) for _ in range(n)]

def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]



n=n0()



ans=0

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

    c=0

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

        if k%i==0:

            c+=2

    if i**2==k:

        c-=1

    if c==8:

        ans+=1

print(ans)
def n0():return int(eval(input()))

def n1():return [int(x) for x in input().split()]

def n2(n):return [int(eval(input())) for _ in range(n)]

def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]



n=n0()



ans=0

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

    c=0

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

        if k%i==0:

            c+=1

#     if i**2==k:

#         c-=1

    if c==8:

        ans+=1

print(ans)
def n0():
    return int(eval(input()))


def n1():
    return [int(x) for x in input().split()]


def n2(n):
    return [int(eval(input())) for _ in range(n)]


def n3(n):
    return [[int(x) for x in input().split()] for _ in range(n)]


n = n0()
ans = 0
for k in range(105, n + 1, 2):
    c = 0
    for i in range(1, int(k**0.5) + 1):
        if k % i == 0:
            c += 2
    if i**2 == k:
        c -= 1
    if c == 8:
        ans += 1
print(ans)

def n0():
    return int(eval(input()))


def n1():
    return [int(x) for x in input().split()]


def n2(n):
    return [int(eval(input())) for _ in range(n)]


def n3(n):
    return [[int(x) for x in input().split()] for _ in range(n)]


n = n0()
ans = 0
for k in range(105, n + 1, 2):
    c = 0
    for i in range(1, k + 1):
        if k % i == 0:
            c += 1
    #     if i**2==k:
    #         c-=1
    if c == 8:
        ans += 1
print(ans)

-    for i in range(1, int(k**0.5) + 1): +    for i in range(1, k + 1): -            c += 2 -    if i**2 == k: -        c -= 1 +            c += 1 +    #     if i**2==k: +    #         c-=1