The Expression from the Numbers#71

The Expression from the Numbers

1 second
128 megabytes
Very easy

This is a classic mathematics problem: using digits , arithmetic operations, and parentheses, how can you write the number ?

For example, this can be achieved as (2 + 2 \times 2) + 2 / 2, or 22 / 2 - 2 \times 2, or 2 \times (2 + 2) - 2 / 2.

Given exactly digits , what is the smallest natural number that cannot be represented using arithmetic expressions formed from these digits (you may use arithmetic operations and parentheses)?

Input

The only line contains two natural numbers and (1 \leq n \leq 7, 1 \leq d \leq 9).

Output

Print the smallest natural number that cannot be written as an arithmetic expression using exactly digits .

Examples

Example 1

Loading
Loading

Note

Division must always be integer division (without remainder).