#abc300g. [abc300_g]P-smooth number

[abc300_g]P-smooth number

Problem Statement

A positive integer is called a kk-smooth number if none of its prime factors exceeds kk.
Given an integer NN and a prime PP not exceeding 100100, find the number of PP-smooth numbers not exceeding NN.

Constraints

  • NN is an integer such that 1leNle10161 \\le N \\le 10^{16}.
  • PP is a prime such that 2lePle1002 \\le P \\le 100.

Input

The input is given from Standard Input in the following format:

NN PP

Output

Print the answer as an integer.


Sample Input 1

36 3

Sample Output 1

14

The 33-smooth numbers not exceeding 3636 are the following 1414 integers: 1,2,3,4,6,8,9,12,16,18,24,27,32,361,2,3,4,6,8,9,12,16,18,24,27,32,36.
Note that 11 is a kk-smooth number for all primes kk.


Sample Input 2

10000000000000000 97

Sample Output 2

2345134674