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


def primegenerator(max):
    flags = [0, 0, 1]
    counter = 3
    while counter <= max:
        flags.append(1)
        counter += 1
    p = 2
    while p <= math.sqrt(max):
        crossOf(p, flags)
        p = nextPrime(p, flags)
    prime_numbers = []
    for i, v in enumerate(flags):
        if v == 1:
            prime_numbers.append(i)
    return prime_numbers


def crossOf(prime, flags):
    count = prime * prime
    while count < len(flags):
        flags[count] = 0
        count += prime


def nextPrime(prime, flags):
    if prime == 2:
        next_prime = prime + 1
    else:
        next_prime = prime + 2
    while next_prime < len(flags) and flags[next_prime] == 0:
        next_prime += 2
    return next_prime


def almostPrime(prime_numbers, max):
    if len(prime_numbers) < 2:
        return 0
    count = 0
    m = 6
    while m <= max:
        flag = True
        helper = 0
        for p in prime_numbers:
            if p > m:
                break
            elif m % p == 0:
                helper += 1
            elif helper > 2:
                flag = False
                break
        if flag and helper == 2:
            count += 1
        m += 1
    return count


if __name__ == '__main__':
    num1 = int(input())
    prime_numbers = primegenerator(num1)
    print(almostPrime(prime_numbers, num1))
