测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A7823. 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 contains one integer number $n$ ( $1<=n<=3000$ ).

输出格式

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

输入输出样例

输入 #1
10
输出 #1
2
输入 #2
21
输出 #2
8
上一题 去做题 下一题