#ACSL1819S1. Digit Reassembly

Digit Reassembly

PROBLEM: Given a number less than 105010^{50} and a length n, starting on the left, form all non-overlapping n-digit numbers. If there are digits remaining on the right, add trailing zeros to ensure that the last number is n digits in length. Print the sum of all of the numbers formed. For example, given 13256709 3, the 3-digit numbers formed from are 132, 567, and 090. The sum of all the numbers is 789.

INPUT: There will 5 lines of input. Each will contain a positive integer less than 105010^{50} and a positive integer n.

OUTPUT: For each line of input, print the sum of all the n-digit numbers formed.

SAMPLE INPUT :

13256709 3
3587612098 1
265472 5
3126854901231 4
25768437216701562 7

SAMPLE OUTPUT:

789
49
46547
12798
15413544