Competitions

# Primes at the interval

Find the maximum positive integer a such that the number of prime numbers on the interval [a; b] inclusively equals to c.

#### Input

Two integers b and c (b106).

#### Output

Print the maximum value of a. It is known that it usually exists.

Time limit 1 second
Memory limit 128 MiB
Input example #1
10 3

Output example #1
3

Author Michael Medvediev