N = int(eval(input()))

ansCnt = 0

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

    tmpCnt = 0

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

        if i < j:

            break

        if i % j == 0:

            tmpCnt += 1

    if tmpCnt == 8:

        ansCnt += 1



print(ansCnt)
N = int(eval(input()))

ans = 0

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

    cnt = 0

    if i % 2 != 0:

        for j in range(1, int(pow(i, 0.5)) + 1):

            if i % j == 0:

                cnt += 1

                if j != i // j:

                    cnt += 1

        if cnt == 8:

            ans += 1



print(ans)
N = int(eval(input()))
ansCnt = 0
for i in range(1, N + 1, 2):
    tmpCnt = 0
    for j in range(1, N + 1):
        if i < j:
            break
        if i % j == 0:
            tmpCnt += 1
    if tmpCnt == 8:
        ansCnt += 1
print(ansCnt)

N = int(eval(input()))
ans = 0
for i in range(1, N + 1):
    cnt = 0
    if i % 2 != 0:
        for j in range(1, int(pow(i, 0.5)) + 1):
            if i % j == 0:
                cnt += 1
                if j != i // j:
                    cnt += 1
        if cnt == 8:
            ans += 1
print(ans)

-ansCnt = 0 -for i in range(1, N + 1, 2): -    tmpCnt = 0 -    for j in range(1, N + 1): -        if i < j: -            break -        if i % j == 0: -            tmpCnt += 1 -    if tmpCnt == 8: -        ansCnt += 1 -print(ansCnt) +ans = 0 +for i in range(1, N + 1): +    cnt = 0 +    if i % 2 != 0: +        for j in range(1, int(pow(i, 0.5)) + 1): +            if i % j == 0: +                cnt += 1 +                if j != i // j: +                    cnt += 1 +        if cnt == 8: +            ans += 1 +print(ans)