#2624. B-smooth数

B-smooth数

B−smoothB-smooth 数

题目描述

⼩杨同学想寻找⼀种名为 B−smoothB-smooth 数的正整数。

如果⼀个正整数的最⼤质因⼦不超过B ,则该正整数为 B−smoothB-smooth 数。

⼩杨同学想知道,对于给定的n 和 B,有多少个不超过n的 B−smoothB-smooth 数。

输入格式

第⼀⾏包含两个正整数n 和 B ,含义如题⾯所⽰。

输出格式

输出⼀个⾮负整数,表⽰不超过 nn 的B−smoothB-smooth 数的数量。

样例 #1

样例输入 #1

10 3

样例输出 #1

7

数据范围

1≤n,B≤106 1 \leq n, B \leq 10^6