eolymp
bolt
Try our new interface for solving problems
Problems

Formatting

Formatting

Rybka is going to format Watson’s hard drive partition. This partition should contain \textbf{N} sectors, sequentially numbered with decimal integers starting from \textbf{A}. How many digits Rybka needs to enumerate all sectors? \InputFile Positive integers \textbf{N} and \textbf{A}, not exceeding \textbf{10^8}^\{.\} \OutputFile Number of digits necessary for formatting.
Time limit 0.5 seconds
Memory limit 16 MiB
Input example #1
3 9
Output example #1
5

Example description: Three numbers are used: 9, 10, 11. These numbers contain 5 digits.