Consider an infinite numerical sequence defined as follows: A_1 = 1, A_2 = 12, ..., A_{10} = 12345678910, A_{11} = 1234567891011, and so on. The first term is , and each subsequent term is formed by appending the decimal representation of its index to the end of the previous term's decimal value.
Given two integers, and , your task is to find how many terms in this sequence, with an index not exceeding , are divisible by 2^N without a remainder.
The input consists of a single line containing two positive integers, and (0 < M \leq 10^{18}, 0 < N < 7).
Output a single line containing the answer to the problem.
Example 1