A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.

Input

Input contains one integer number n (1 ≤ n ≤ 3000).

Output

Output the amount of almost prime numbers between 1 and n, inclusive.

Examples

Input

10


Output

2


Input

21


Output

8
import math
import time


def isprime(n):
	if n == 2 or n == 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	else:
		i = 1
		while True:
			
			if i*6-1>math.sqrt(n):
				return True
			elif n % (i*6-1) == 0:
				return False
			elif n % (i*6+1) == 0:
				return False
			i+=1

		
n = int(raw_input())	
re = 0

for i in range(2,n+1):
	if not isprime(i):
		count = 0
		for j in range(2, int(i/2)+1):
			if isprime(j) and i%j == 0:
				count+=1
				if count == 3:
					break
		if count == 2:
			re+=1
print re
