Given a positive integer equal to C^n, where C = 1..9, and the number contains at least digits equal to . For given and , find the smallest possible value of .
The input file contains two numbers and , where K \leq 500.
Output a single number .
Example 1