JHK (whose true name shall not be revealed) is one of Mr. Ing's favourite students. In light of the recent successful defense of the Ingdom, JHK decides to celebrate by preparing for this year's Putnam contest. On week one of his Seven Week Challenge, JHK decides he wants to study prime numbers. Write a program to help him solve the following problem.
Define the Junghoon-value (or the -value for short) of a positive integer
to be the least number of primes (not necessarily distinct) required to yield a sum of
. For example, the number
can be formed using the primes
OR
, therefore its
-value is 2. Note: If no combination of primes sum to
, its
-value is undefined.
Help Junghoon JHK find the number of positive integers less than or equal to
with
-value of exactly
.
Input Specification
One line containing two space-separated integers and
.
Output Specification
Print the number of positive integers less than or equal to with
-value of exactly
.
Hint
It would be helpful to know the Sieve of Eratosthenes.
Sample Input
5 1
Sample Output
3
Comments