CF26A.Almost Prime

传统题 时间 2000 ms 内存 256 MiB 4 尝试 1 已通过 1 标签

Almost Prime

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.

Samples

10
2
21
8

在线编程 IDE

建议全屏模式获得最佳体验