第 26 场 Codeforces Beta Round(Codeforces 赛制)
A
几乎素数
Almost Prime
Codeforces
900
原题
←B →

几乎素数AI (CI翻译)

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.

一个数如果恰好有两个不同的素因子,就称为几乎素数。例如,6、18、24 是几乎素数,而 4、8、9、42 不是。请计算 1 到 $*n*$(含)之间有多少个几乎素数。AI (CI翻译)

Input

输入格式

AI (CI翻译)

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

输入包含一个整数 $*n*$ ($1 ≤ *n* ≤ 3000$)。AI (CI翻译)

Output

输出格式

AI (CI翻译)

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

输出 1 到 $*n*$(含)之间几乎素数的个数。AI (CI翻译)

样例

Input #1
10
Output #1
2
InputCopy OutputCopy
Input #2
21
Output #2
8
InputCopy OutputCopy
题目信息
题号
26A
时间限制
2 s
内存限制
256 MB
标签
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。