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()

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()

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()

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()

-read = sys.stdin.buffer.read -inputs = sys.stdin.buffer.readlines +# 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())) + + -# import numpy as np -    n = int(eval(input())) +    n = II() +    li = [105, 135, 165, 189, 195] -    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 +    for i in range(n + 1): +        if i in li: +            ans += 1