303437: CF665F. Four Divisors

Memory Limit:768 MB Time Limit:10 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Four Divisors

题意翻译

请找出1到n当中,恰有4个约数的数的个数。

题目描述

If an integer $ a $ is divisible by another integer $ b $ , then $ b $ is called the divisor of $ a $ . For example: $ 12 $ has positive $ 6 $ divisors. They are $ 1 $ , $ 2 $ , $ 3 $ , $ 4 $ , $ 6 $ and $ 12 $ . Let’s define a function $ D(n) $ — number of integers between $ 1 $ and $ n $ (inclusive) which has exactly four positive divisors. Between $ 1 $ and $ 10 $ only the integers $ 6 $ , $ 8 $ and $ 10 $ has exactly four positive divisors. So, $ D(10)=3 $ . You are given an integer $ n $ . You have to calculate $ D(n) $ .

输入输出格式

输入格式


The only line contains integer $ n $ ( $ 1<=n<=10^{11} $ ) — the parameter from the problem statement.

输出格式


Print the only integer $ c $ — the number of integers between $ 1 $ and $ n $ with exactly four divisors.

输入输出样例

输入样例 #1

10

输出样例 #1

3

输入样例 #2

20

输出样例 #2

5

Input

题意翻译

请找出1到n当中,恰有4个约数的数的个数。

加入题单

上一题 下一题 算法标签: