List the positive integers whose smallest prime factor is P in increasing order. Find the N-th number in this list.
The first line contains two integers N and P. (1 ≤ N, P ≤ 10^9) P is always prime.
Print the N-th smallest positive integer whose smallest prime factor is P. If that number is greater than 10^9, print 0.