B. Bugcat's Counting Game
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

There is a creature known as Bugcat who wants to play a counting game. At the start of the game, Bugcat chooses a fixed integer $$$k$$$. Then, starting from $$$1$$$, Bugcat begins counting upwards, but it will only call out a number if it meets at least one of the following conditions:

1. The number is a multiple of $$$k$$$.

2. The digit $$$k$$$ appears in the decimal representation of the number.

Bugcat wants to know what the $$$x$$$-th number it calls out will be. Since Bugcat is a bit slow and can only count one by one, it has tasked you with finding the answer.

Input

The input consists of two integers, $$$k$$$ and $$$x$$$ ($$$1 \le k \le 9, x \le 10^5$$$).

Output

Print a single integer representing the $$$x$$$-th number that Bugcat calls out.

Examples
Input
3 5
Output
13
Input
4 5
Output
16
Note

In the first test case, the numbers Bugcat calls out are $$$3, 6, 9, 12, 13, \dots$$$. The $$$5$$$-th number in this sequence is $$$13$$$.

In the second test case, the numbers Bugcat calls out are $$$4, 8, 12, 14, 16, \dots$$$. The $$$5$$$-th number in this sequence is $$$16$$$.