CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))

ans = 0

for i in range(1,n+1,2):
    divisor = 0
    for ii in range(1,i+1):
        if i % ii == 0:
            divisor += 1
        
    if divisor == 8:
        ans += 1
        
print(ans)


# Optimized solution
# https://qiita.com/LorseKudos/items/9eb560494862c8b4eb56

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

n = int(eval(input()))

ans = 0

for i in range(1,n+1,2):
    if len(make_divisors(i)) == 8:
        ans += 1
        
print(ans)
# Original solution
N=int(eval(input()))

ans=0
for i in range(1,N+1):
    count=0
    for j in range(1,N+1,2):
        if i%j == 0:
            count +=1
        
    if count == 8:
        
        ans +=1

print(ans)       

# Optimized solution
def divisor(x):
  i=1
  table = []
  while i * i <= x:
    if x%i == 0:
      table.append(i)
      table.append(x//i)
    i += 1
  table = list(set(table))
  return table

n=int(eval(input()))

ans=0
for i in range(1,n+1,2):
  cnt = len(divisor(i))
  if cnt == 8:
    ans += 1

print(ans)
# Original solution
n=int(eval(input()))

def yakusu(num):
    list_a=[]
    for i in range(1,num//2+1):
        if num % i == 0:
            list_a.append(i)
    list_a.append(num)
    return list_a

ans=0
for i in range(1,n+1):
    if len(yakusu(i)) == 8 and i % 2 == 1:
        ans += 1
print(ans)


# Optimized solution
n = int(eval(input()))
ans = 0

def get_yakusu_num(n):
    m = int(n ** (1/2))
    rep_list = []
    for i in range(1, m + 2):
        if n % i == 0:
            p = n // i
            rep_list.append(i)
            rep_list.append(p)
    return len(set(rep_list))

for i in range(1, n + 1):
    if get_yakusu_num(i) == 8 and i % 2 == 1:
        ans += 1
print(ans)
# Original solution
import math
n = int(eval(input()))

ans = 0
if n < 105:
    print((0))
else:
    for i in range(105, n +1, 2):
        div = []
        for j in range(1, int(math.sqrt(i**2) + 1)):
            if i % j == 0:
                div.append(j)
                if j != i // j:
                    div.append(i //j)
        if len(div) // 2 == 8:
            ans += 1
    print(ans)

# Optimized solution
n = int(eval(input()))


def make_divisor(n):
    divisors = []
    if n % 2 == 0:
        return 0
    for i in range(1, int(n ** 0.5) + 1, 2):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    return len(divisors)


ans = 0
for i in range(1, n+1):
    if make_divisor(i) == 8:
        ans += 1
print(ans)
# Original solution
# https://atcoder.jp/contests/abc106/tasks/abc106_b
import fractions

N = int(eval(input()))


def is_8(num):
    if num < 1:
        return False
    elif num == 1:
        return False
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)
        if len(divisor_list) == 8:
            return True

cnt = 0
for i in range(1, N + 1, 2):
    if is_8(i):
        cnt += 1

print(cnt)


# Optimized solution
# https://atcoder.jp/contests/abc106/tasks/abc106_b
import math

N = int(eval(input()))


def is_8(num):
    if num < 1:
        return False
    elif num == 1:
        return False
    else:
        divisor_list = set()
        divisor_list.add(1)
        # root nまで見れば問題ない
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                divisor_list.add(num // i)
                divisor_list.add(i)
        # 元の数を入れる
        divisor_list.add(num)
        if len(divisor_list) == 8:
            return True

cnt = 0
for i in range(1, N + 1, 2):
    if is_8(i):
        cnt += 1

print(cnt)
# Original solution
n = int(eval(input())) + 1
ans = 0


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

for val in range(n):
    if len(make_divisors(val)) == 8 and val%2 != 0:
        ans += 1
print(ans)


# Optimized solution
def divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

n = int(eval(input()))

ans = 0
for i in range(1,n+1):
    if i%2 != 0 and len(divisors(i)) == 8:
        ans += 1
print(ans)
# Original solution
n = int(eval(input()))

ans = 0
for i in range(1, n+1 ,2):
    divisor_count = 0
    for j in range(1, i+1):
        if i%j == 0:
            divisor_count +=1
            if divisor_count == 8:
                ans += 1

print(ans)


# Optimized solution
n = int(eval(input()))

ans = 0
for i in range(1, n + 1 ,2):
    divisor_count = 0
    for j in range(1, i + 1):
        if i % j == 0:
            divisor_count += 1
    if divisor_count == 8:
        ans += 1

print(ans)
# Original solution
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

N = int(eval(input()))
# print(len(make_divisors(N)))
answer = 0
for i in range(1, N+1):
    # print(len(make_divisors(i)))
    if len(make_divisors(i)) == 8 and i % 2 != 0:
        answer += 1

print(answer)

# Optimized solution
N = int(eval(input()))

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    # divisors.sort()
    return divisors

ans = 0
for i in range(1, N+1, 2):
    # print(i)
    divs = make_divisors(i)
    if len(divs) == 8:
        ans += 1

print(ans)
# Original solution
# 引数nが持つ正の約数の数を調べる
def divisor_count(n:int) -> int:
  count = 0
  for x in range(1, n+1):
    if n % x == 0:
      count += 1
  
  return count

def solve(n: int) -> int:
  # [1..N]内で奇数かつ約数をちょうど8個持つ数字の数
  result = 0
  for x in range(1, n+1):
    if x&1 and divisor_count(x) == 8:
      result += 1
  return result
  
N = int(eval(input()))
print((solve(N)))

# Optimized solution
# 引数nが持つ正の約数の数を調べる
def divisor_count(n:int) -> int:
  count = 0
  for x in range(1, n+1):
    if n % x == 0:
      count += 1
  
  return count

def solve(n: int) -> int:
  # [1..N]内で奇数かつ約数をちょうど8個持つ数字の数
  result = 0
  for x in range(1, n+1, 2):
    if divisor_count(x) == 8:
      result += 1
  return result
  
N = int(eval(input()))
print((solve(N)))
# Original solution
N = int(eval(input()))
if N < 105:
    print((0))
elif N < 135:
    print((1))
elif N < 165:
    print((2))
elif N < 189:
    print((3))
elif N < 195:
    print((4))
else:
    print((5))


# Optimized solution
N = int(eval(input()))
A = [105, 135, 165, 189, 195]
print((sum([1 for a in A if a <= N])))
# Original solution
n = int(eval(input()))
ans = 0
for i in range(1,n+1):
    tmp = 0
    for j in range(1,i+1):
        if i%2 == 0:
            continue
        if i%j == 0:
            tmp += 1
    if tmp == 8:
        ans += 1
        
print(ans)

# Optimized solution
n = int(eval(input()))

ans = 0

for i in range(1, n+1):
    if i%2 == 0:
        continue
    
    cnt = 0
    for j in range(1, i+1):
        if i%j == 0:
            cnt += 1
    
    if cnt == 8:
        ans += 1
        
print(ans)
# Original solution
n = int(eval(input()))
p = 0

for i in range(n + 1)[1::2]:
    c = 0
    j = i
    k = i
    while j > 0:
        if k % j == 0:
            c += 1
        j -= 1
    if c >= 8:
        p += 1

print(p)

# Optimized solution
n = int(eval(input()))
ans = 0
for i in range(1,n+1)[::2]:
    p = 0
    for j in range(1,i+1):
        if i % j == 0:
            p += 1
    if p == 8:
        ans += 1
print(ans)
# Original solution
n = int(eval(input()))
ans = 0
L = [0]*200
for i in range(1,n+1,2):
  tmp = 1
  cnt = 0
  while tmp <= i:
    if i % tmp == 0:
      cnt += 1
    tmp += 1
    L[i] = cnt
print((L.count(8)))

# Optimized solution
n = int(eval(input()))
L = [0]*200
for i in range(1,n+1,2):
  tmp = 1
  cnt = 0
  while tmp <= i:
    if i % tmp == 0:
      cnt += 1
    tmp += 1
    L[i] = cnt
print((L.count(8)))
# Original solution
n = int(eval(input()))
L = [0]*200
for i in range(1,n+1,2):
  tmp = 1
  cnt = 0
  while tmp <= i:
    if i % tmp == 0:
      cnt += 1
    tmp += 1
    L[i] = cnt
print((L.count(8)))

# Optimized solution
n = int(eval(input()))
ans = 0
for i in range(1,n+1,2):
  cnt = 0
  for j in range(1,i+1):
    if i % j == 0:
      cnt += 1
    if cnt == 8:
      ans += 1
print(ans)
# Original solution
n=int(eval(input()))
x=0
for j in range(1,n+1):
    if j%2==0:
        continue
    m=0
    for i in range(1,j+1):
        if j%i==0:
            m+=1
    if m==8:
        x+=1
print(x)


# Optimized solution
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors
n=int(eval(input()))
if n<105:
    print((0))
    exit()
ans=1
for i in range(106,n+1):
    if i%2==0:
        continue
    l=make_divisors(i)
    if len(l)==8:
        ans+=1
print(ans)
# Original solution
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors
n=int(eval(input()))
if n<105:
    print((0))
    exit()
ans=1
for i in range(106,n+1):
    if i%2==0:
        continue
    l=make_divisors(i)
    if len(l)==8:
        ans+=1
print(ans)


# Optimized solution
n=int(eval(input()))
if n<105:
    print((0))
    exit()
ans=0
for i in range(105,n+1,2):
    c=0
    for j in range(1,i+1):
        if i%j==0:
            c+=1
    if c==8:
        ans+=1
print(ans)
# Original solution
n = int(eval(input()))
if 104 >= n:
    print((0))
    exit()
ans = 0
for i in range(105,n+1,2):
    l1 = [0]*(i+1)
    count = 1
    for j in range(2,i+1):
        if i % j == 0:
            while i % j == 0:
                l1[j] += 1
                i //= j
    for k in l1:
        count *= (k+1)
    if count == 8:
        ans += 1

print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0
for i in range(1,n+1,2):
    count = 0
    for j in range(1,i+1):
        if i%j==0:
            count += 1
    if count == 8:
        ans += 1
print(ans)
# Original solution
n = int(eval(input()))
nSum = 0
for i in range(n):
    cnt = 0
    for j in range(i + 1):
        if (i + 1) % (j + 1) == 0:
            cnt += 1
    if cnt == 8 and (i + 1) % 2 != 0:
        nSum += 1

print(nSum)


# Optimized solution
n = int(eval(input()))
nSum = 0
for i in range(n):
    cnt = 0
    if (i + 1) % 2 != 0:
        for j in range(i + 1):
            if (i + 1) % (j + 1) == 0:
                cnt += 1
        if cnt == 8:
            nSum += 1

print(nSum)
# Original solution
n = int(eval(input()))
nSum = 0
for i in range(n):
    cnt = 0
    if (i + 1) % 2 != 0:
        for j in range(i + 1):
            if (i + 1) % (j + 1) == 0:
                cnt += 1
        if cnt == 8:
            nSum += 1

print(nSum)


# Optimized solution
n = int(eval(input()))
a = [105, 135, 165, 189, 195]
for i in range(5):
    a[i] = 1 if n >= a[i] else 0
print((sum(a)))
# Original solution
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)


# Optimized solution
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)
# Original solution
# -*- coding: utf-8 -*-
# 標準入力を取得
N = int(eval(input()))

# 求解処理
ans = 0
for n in range(1, N + 1, 2):
    divisors_count = 0
    for i in range(1, n + 1):
        if n % i == 0:
            divisors_count += 1
    if divisors_count == 8:
        ans += 1

# 結果出力
print(ans)


# Optimized solution
# -*- coding: utf-8 -*-

def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(eval(input()))

    return N


def main(N: int) -> None:
    """
    メイン処理.

    Args:\n
        N (int): 1以上200以下の整数
    """
    # 求解処理
    ans = 0
    for n in range(1, N + 1, 2):
        divisors_count = 0
        for i in range(1, n + 1):
            if n % i == 0:
                divisors_count += 1
        if divisors_count == 8:
            ans += 1

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    N = get_input()

    # メイン処理
    main(N)
# Original solution
n = int(eval(input()))
int_list = []
for i in range(1,n+1,2):
    num = 0
    for j in range(1, i + 1):
        if i % j == 0:
            num += 1
    if num == 8:
        int_list.append(i)
print((len(int_list)))

# Optimized solution
import sys
n = int(eval(input()))
if n <= 3:
    print((3))
    sys.exit()
def check(a):
    sqrt = round(a ** 0.5 + 0.5)
    factors = {1, a}
    for i in range(2, sqrt + 1):
        if not a % i:
            if not i in factors:
                factors.add(i)
            j = a // i
            if not j in factors:
                factors.add(j)
    return len(factors)
ans = 0
for i in range(3, n + 1, 2):
    if check(i) == 8:
        ans += 1
print(ans)
# Original solution
N=int(eval(input()))
count = 0
count2 = 0
for i in range(1,N+1):
    #print(i,"i")
    for j in range(1,N+1):
        #print(j,"k")
        if i % j == 0 :
            count += 1
            #print(count,"count")
    if count == 8 and i%2 != 0:
        count2 += 1
    ans = count2
    count = 0
print(ans)


# Optimized solution
N=int(eval(input()))
cnt = 0
ans = 0
for i in range(1,N+1):
    if i % 2 != 0:
        for j in range(1,i+1):
            if i%j == 0:
                cnt += 1
                #print(j)
    if cnt == 8:
        ans += 1
    cnt = 0
print(ans)
# Original solution
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines

# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
# import numpy as np

def main():
	n=int(eval(input()))
	ans=0
	if n>=105:
		ans+=1
	if n>=135:
		ans+=1
	if n>=165:
		ans+=1
	if n>=189:
		ans+=1
	if n>=195:
		ans+=1
	
	print(ans)
	
	
if __name__ == "__main__":
	main()


# Optimized solution
import sys
input = sys.stdin.buffer.readline
#input = sys.stdin.readline

def II(): return int(eval(input()))
def MI(): return list(map(int,input().split()))
def LI(): return list(map(int,input().split()))

# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())

def main():
	n=II()
	li=[105,135,165,189,195]
	ans=0
	for i in range(n+1):
		if i in li:
			ans+=1
	print(ans)















if __name__ == "__main__":
	main()
# Original solution
N = int(eval(input()))
if N <=104:
    print((0))
    
elif N <= 106:
    print((1))

else:
    if N%2 != 0:
        num = list(range(105, N+1))
        kotae = list(range(1, N+2, 2))
    else:
        num = list(range(105, N))
        kotae = list(range(1, N, 2))
        
    num = num[::2]
    ans = [0] * len(num)
    
    for index, i in enumerate(num):
        for t in kotae:
            if i%t ==0:
                ans[index] += 1
    print((len([1 for x in ans if x>=8])))

# Optimized solution
N = int(eval(input()))
odd = list(range(1, N+1, 2))
ans = 0

for ki in odd:
    count = 0
    for waru in range(1,ki+1):
        if ki % waru == 0:
            count += 1
    if count == 8:
        ans += 1
print(ans)
# Original solution
n = int(eval(input()))
if 1 <= n < 105:
    print("0")
elif 105 <= n < 135:
    print("1")
elif 135 <= n < 165:
    print("2")
elif 165 <= n < 189:
    print("3")
elif 189 <= n < 195:
    print("4")
elif 195 <= n <= 200:
    print("5")

# Optimized solution
n = int(eval(input()))
if 1 <= n < 105:
    print((0))
elif 105 <= n < 135:
    print((1))
elif 135 <= n < 165:
    print((2))
elif 165 <= n < 189:
    print((3))
elif 189 <= n < 195:
    print((4))
else:
    print((5))
# Original solution
c = int(eval(input()))
b = 0
for i in range(1, c + 1, 2):
    a = 0
    for j in range(1, c + 1):
        if i % j == 0:
            a += 1
    if a == 8:
        b += 1
print(b)


# Optimized solution
a = int(eval(input()))
c = 0
for i in range(a + 1):
    if i % 2 == 1:
        b = 0
        for j in range(1, i + 1):
            if i % j == 0:
                b += 1
        if b == 8:
            c += 1
print(c)
# Original solution
def d(K):
    res=0
    for i in range(1,K+1):
        if K%i==0:
            res+=1
    return res

N=int(eval(input()))
ans=0
for i in range(1,N+1):
    if i%2==0:
        continue
    if d(i)==8:
        ans+=1
print(ans)


# Optimized solution
N=int(eval(input()));L=[105,135,165,189,195];a=0
for i in L:a+=1 if i<=N else 0
print(a)
# Original solution
N = int(eval(input()))
cd = [0] * N
for i in range(1, N+1):
    for j in range(i, N+1):
        if j % i == 0:
            cd[j-1] += 1
print((cd[::2].count(8)))


# Optimized solution
N = int(eval(input()))
cd = [0] * (N // 2 + 1)
for i in range(1, N+1, 2):
    for j in range(i, N+1, 2):
        if j % i == 0:
            cd[j // 2] += 1
print((cd.count(8)))
# Original solution
n=int(eval(input()))
p=0
for i in range(105,n+1,2):
    c=0
    for j in range(1,i+1):
        if i%j==0:
            c+=1
    if c==8:
        p+=1
print(p)

# Optimized solution
n=int(eval(input()))
print((sum(i<=n for i in [105,135,165,189,195])))
# Original solution
N = int(eval(input()))
ans = 0
for i in range(1, N + 1, 2):
    cnt = 0
    for j in range(1, N + 1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1

print(ans)

# Optimized solution
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

n = int(eval(input()))

def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table

table = num_divisors_table(n)
ans = 0
for i in range(1, n + 1, 2):
    if table[i] == 8:
        ans += 1
print(ans)
# Original solution
from math import sqrt
N=int(eval(input()))
ans=0
for i in range(1,N+1,2):
  d=[]
  for j in range(1,int(sqrt(i))+1):
    if i%j==0:
      d.append(j)
      d.append(N//j)
  d=list(set(d))
  if len(d)==8:
    ans+=1
print(ans)

# Optimized solution
N=int(eval(input()))
ans=0
for i in range(1,N+1,2):
  cnt=2
  for j in range(3,int(i**0.5)+1,2):
    if i%j==0:
      cnt+=2
  if cnt==8:
    ans+=1
print(ans)
# Original solution
def compute_divisors(num):
    divisors = set()
    for i in range(1, int(num**.5) + 1):
        if num % i == 0:
            divisors.add(i)
            divisors.add(num // i)
    return divisors

print((sum(len(compute_divisors(i))==8 for i in range(1,int(eval(input()))+1, 2))))

# Optimized solution
n=int(eval(input()));print((sum(x<=n-100for x in[5,35,65,89,95])))
# Original solution
n=int(eval(input()))

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

ans=0

for i in range(1,n+1):
  if i % 2 == 1:
    l=make_divisors(i)
    if len(l)==8:
      ans+=1

print(ans)

# Optimized solution
n=int(eval(input()))

def count_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return len(lower_divisors + upper_divisors[::-1])


ans=0
for i in range(1,n+1):
    if i%2==1:
        c=count_divisors(i)
        if c==8:
            ans+=1
            #print(i)
print(ans)
# Original solution
N = int(eval(input()))

count = 0
for i in range(N):
    divisor_count = 0
    for j in range(i + 1):
        # 偶数は対象外
        if (j + 1) % 2 == 0:
            continue
        if (i + 1) % (j + 1) == 0:
            divisor_count += 1
    if divisor_count == 8:
        count += 1
print(count)


# Optimized solution
N = int(eval(input()))

ok_count = 0
for i in range(1, N + 1, 2):
    # 約数を8個もつものの数
    count = 0
    for j in range(1, i + 1):
        # print("{}".format(j))
        if i % j == 0:
            count += 1
    if count == 8:
        ok_count += 1
print(ok_count)
# Original solution
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

n = int(eval(input()))
ans = 0
for i in range(1, n+1,2):
    if len(make_divisors(i)) == 8:
        ans += 1

print(ans)
    

# Optimized solution
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

n = int(eval(input()))
ans = 0
for i in range(1, n+1):
    if len(make_divisors(i)) == 8 and i%2 == 1:
        ans += 1

print(ans)
# Original solution
N = int(eval(input()))
ans = 0
count = 0
for i in range(2, N+1):
   for j in range(1, i+1):
      if i % j == 0:
         count += 1
   if count == 8 and i % 2 == 1:
      ans += 1
   count = 0

print(ans)

# Optimized solution
N = int(eval(input()))
ans = 0
count = 0
#1の約数の数は絶対1、面倒なので2~Nのカウントにした。+1忘れないように
for i in range(2, N+1):
   for j in range(1, i+1):
      if i % j == 0:
         count += 1
   if count == 8 and i % 2 == 1:
      ans += 1
   count = 0

print(ans)
# Original solution
N = int(eval(input()))

ans = 0
for i in range(1, N + 1):
    res = 0
    for q in range(1, N + 1):
        if i % 2 != 0:
            if i % q == 0:
                res += 1
    if res == 8:
        ans += 1

print(ans)

# Optimized solution
N = int(eval(input()))
ans = 0
for n in range(1, N+1):
    cnt = 0
    if n % 2 == 1:
        for i in range(1, N+1):
            if n % i == 0:
                cnt += 1
    if cnt == 8:
        ans += 1
print(ans)
# Original solution
n=int(eval(input()))
c=0
for i in range(1,n+1):
    if not i%2:continue
    t=0
    for j in range(1,i+1):
        if not i%j:t+=1
    if t==8:c+=1
print(c)

# Optimized solution
n=int(eval(input()));print((sum(x<n-99for x in[5,35,65,89,95])))
# Original solution
n=int(eval(input()))
a=[3,5,7,9,11,13,17,19]

count=0
for i in range(len(a)):
  for j in range(i+1,len(a)):
    for k in range(j+1,len(a)):
      if a[i]*a[j]*a[k]<=n:
        count+=1

print(count)

# Optimized solution
n=int(eval(input()))
ans=0
for i in range(1,n+1):
  cnt=0
  if i%2==0:continue
  for j in range(1,i+1):
    if i%j==0:cnt+=1
  if cnt==8:
    ans+=1
print(ans)
# Original solution
n = int(eval(input()))
ans = 0
for i in range(1, n+1, 2):
    cnt = 0
    for j in range(1, i+1, 2):
        if i % j == 0:
        	cnt += 1
    if cnt == 8:
        ans += 1
print(ans)


# Optimized solution
n = int(eval(input()))
ans = 0
for i in range(1, n+1, 2):
    cnt = 0
    for j in range(1, n+1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)