import math

import sys

import queue

from collections import Counter

from itertools import accumulate

from fractions import gcd

from functools import reduce



def lcm(a, b):

    return a * b // gcd(a, b)



def combination_count(n, r):

    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))



def permutations_count(n, r):

    return math.factorial(n) // math.factorial(n - r)



mod = 1000000007



"""

# 標準入力取得

## 文字列

    = sys.stdin.readline().rstrip()

    = list(sys.stdin.readline().rstrip())



## 数値

    = int(sys.stdin.readline())

    = map(int, sys.stdin.readline().split())

    = list(map(int, sys.stdin.readline().split()))

    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]

"""



def count(X):

    cnt  = 0

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

        if X % i == 0:

            cnt += 1

    return cnt





if __name__ == "__main__":

    N = int(sys.stdin.readline())

    ans = 0

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

        if i % 2 != 0:

            if count(i) == 8:

                ans += 1

    print(ans)



import math

import sys

import queue

from collections import Counter

from itertools import accumulate

from fractions import gcd

from functools import reduce



def lcm(a, b):

    return a * b // gcd(a, b)



def combination_count(n, r):

    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))



def permutations_count(n, r):

    return math.factorial(n) // math.factorial(n - r)



mod = 1000000007



"""

# 標準入力取得

## 文字列

    = sys.stdin.readline().rstrip()

    = list(sys.stdin.readline().rstrip())



## 数値

    = int(sys.stdin.readline())

    = map(int, sys.stdin.readline().split())

    = list(map(int, sys.stdin.readline().split()))

    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]

"""



def count(X):

    cnt  = 0

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

        if X % i == 0:

            cnt += 1

    return cnt





if __name__ == "__main__":

    N = int(sys.stdin.readline())

    ans = 0

    print((sum(count(x) == 8 for x in range(1, N + 1, 2))))
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce


def lcm(a, b):
    return a * b // gcd(a, b)


def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)


mod = 1000000007
"""
# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())
## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


def count(X):
    cnt = 0
    for i in range(1, X + 1):
        if X % i == 0:
            cnt += 1
    return cnt


if __name__ == "__main__":
    N = int(sys.stdin.readline())
    ans = 0
    for i in range(1, N + 1):
        if i % 2 != 0:
            if count(i) == 8:
                ans += 1
    print(ans)

import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce


def lcm(a, b):
    return a * b // gcd(a, b)


def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)


mod = 1000000007
"""
# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())
## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


def count(X):
    cnt = 0
    for i in range(1, X + 1):
        if X % i == 0:
            cnt += 1
    return cnt


if __name__ == "__main__":
    N = int(sys.stdin.readline())
    ans = 0
    print((sum(count(x) == 8 for x in range(1, N + 1, 2))))

-    for i in range(1, N + 1): -        if i % 2 != 0: -            if count(i) == 8: -                ans += 1 -    print(ans) +    print((sum(count(x) == 8 for x in range(1, N + 1, 2))))