Digits#1687

Digits

1 second
64 megabytes
Easy

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 .

Input

The input file contains two numbers and , where K \leq 500.

Output

Output a single number .

Examples

Example 1

Loading
Loading