Rows (strings of digits) are constructed according to the following rule:
The first row consists of a single character, the digit . Each subsequent row is formed by first writing the row number (without leading zeros), followed by the previous row appended twice.
Here are the first rows created according to this rule:
For instance, the -th row will begin as follows:
...
Given and , determine which digit appears in the -th row at the -th position, or if the row's length is less than .
Two natural numbers and are given (1 \le N \le 100\ 000, 1 \le K \le 10^{15}).
Output the digit located at the -th position in the -th row. If the -th row is shorter than , output (minus one).
Example 1