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
def is_prime(n):
  if n == 2 or n == 3: return True
  if n < 2 or n%2 == 0: return False
  if n < 9: return True
  if n%3 == 0: return False
  r = int(n**0.5)
  f = 5
  while f <= r:
    if n % f == 0: return False
    if n % (f+2) == 0: return False
    f += 6
  return True    


def solve(n):
  count = 0
  for i in range(6,n+1):
    if is_prime(i):
      continue
    s = set()
    for j in range(2,(i//2)+1):
      if i % j == 0 and is_prime(j):
        s.add(j)
    if len(s) == 2:
      count += 1
  return count
        
      

    

  
def main() :
  # arr1 = list(map(int, input().split(' ')))
  n = int(input())
  # arr = []
  # for _ in range(arr1[0]):
    # i = list(map(int, input().split(' ')))
    # arr.append(i)
  print(solve(n))
main()
