시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB33262485.714%

문제

The $n$th Champernowne word is obtained by writing down the first $n$ positive integers and concatenating them together. For example, the 10th Champernowne word is "12345678910".

Given two positive integers $n$ and $k$, count how many of the first $n$ Champernowne words are divisible by $k$.

입력

The single line of input contains two integers, $n$ $(1 \le n \le 10^5)$ and $k$ $(1 \le k \le 10^9)$.

출력

Output a single integer, which is a count of the first $n$ Champernowne words divisible by $k$.

예제 입력 1

4 2

예제 출력 1

2

예제 입력 2

100 7

예제 출력 2

14

예제 입력 3

314 159

예제 출력 3

4

예제 입력 4

100000 999809848

예제 출력 4

1