You are given two positive integers, and
. Define
as the decimal number consisting of
consecutive ones. For example,
. Determine the number of ones in the decimal representation of
.
Constraints
Subtask 1 [20%]
Subtask 2 [80%]
No additional constraints.
Input Specification
The first line contains two space-separated integers, and
.
Output Specification
Output one line containing one integer, the number of ones in the decimal representation of .
Sample Input 1
3 5
Sample Output 1
2
Explanation for Sample 1
ones.
Sample Input 2
314159 265358
Sample Output 2
29486
Comments