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

#F1260. Four Divisors

  • ID: 1266
  • 传统题
  • 2000ms
  • 256MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:挑战
  • 上传者:
  • 数据结构
  • 动态规划
  • 数学
  • 数论
  • 排序
  • 双指针
  • 编程与模拟
  • 算法思想
  • 挑战
  • 难度
  • 共享题库
  • 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 题。保留原作者与原赛事署名。