409619: GYM103647 B Friendly Flamingos
Description
UT Austin has decided to adopt a flamingo on campus named Freddy.
They have allowed students to feed Freddy for the next $$$n$$$ days. However, Freddy has days when he needs to fast and cannot consume food. Assuming that the day he arrived on campus is day 1, there are a couple of rules that Freddy has for the days that he fasts. He will fast on days that are divisible by a certain number $$$k$$$. He has one exception to this rule - he will not fast on a day if the day number is divisible by $$$k^2$$$. Calculate the number of days that Freddy will fast for the next $$$n$$$ days.
InputThere will be one line of input containing two integers. The first integer $$$n$$$ $$$(1 \leq n \leq 10^6)$$$ represents the number of days that Freddy will be on campus. The second integer represents $$$k$$$ $$$(1 \leq k \leq 100)$$$.
OutputOutput the number of days that Freddy will be fasting in the next $$$n$$$ days.
ExamplesInput25 5Output
4Input
200 10Output
18Note
For the first test case, there are 5 multiples of 5 between 1 and 25. However, since day 25 is divisible by 5, there are 4 days that Freddy will fast.
For the second test case, there are 20 multiples. However, Freddy will not fast on day 100 and 200, leaving 18 fasting days.