跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1260. Four Divisors

    ID: 1266 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 8 上传者: 标签>数据结构动态规划数学数论排序双指针编程与模拟算法思想挑战难度共享题库Codeforces英文题面题目来源题面语言

Four Divisors

题目描述

F. Four Divisors
time limit per test
10 seconds
memory limit per test
768 megabytes
input
standard input
output
standard output

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).

Input

The only line contains integer n (1≤n≤1011) − the parameter from the problem statement.

Output

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

Examples
Input
10
Output
3
Input
20
Output
5


题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 743 题。保留原作者与原赛事署名。