A division test for a number is a simple algorithm for checking some number is divisible by . The most well-known division tests are those for two: a number is divisible by two if its last digit is even; and for three: three divides a number if and only if three divides the sum of its digits.
Rosalina has learned a division test for all the numbers up to . She now wonders how useful this skill is. Specifically, she wants to know how many numbers less than or equal to are divisible by some number less than or equal to , since for those numbers Rosalina can successfully apply a division test.
Input Specification
The input contains two integers ().
For 20 of 100 points, .
For an additional 20 of 100 points, .
Output Specification
Output the number of numbers less than or equal to which are divisible by a number greater than 1 and less than or equal to .
Sample Input 1
2 10
Sample Output 1
5
Sample Input 2
6 18
Sample Output 2
13
Comments