The natural numbers are written in sequence to form the following series:
123456789101112131415161718192021222324…
In this sequence, your task is to determine the position of the first digit in the first occurrence of consecutive digits .
The input consists of a single line containing two integers, and (d = 0..9). The input is guaranteed such that the result will not exceed 10^9.
Answer to the problem.
Example 1