Digit Sum


Given three integers LL, RR, and MM, count how many integers xx satisfy LxRL \le x \le R and have digit sum divisible by MM.

The digit sum of a number is the sum of its decimal digits. For example, the digit sum of 20472047 is 2+0+4+7=132 + 0 + 4 + 7 = 13.

Input

The input consists of a single line containing three integers LL, RR, and MM.

Output

Print the number of valid integers in the range.

Constraints

  • 0LR<1010000 \le L \le R < 10^{1000}
  • 1M2001 \le M \le 200
  • LL and RR do not contain leading zeroes, unless the number is exactly 0

Example 1

Input 1
1 20 2
Output 1
10
Explanation

The valid values are 22, 44, 66, 88, 1111, 1313, 1515, 1717, 1919, and 2020.

Example 2

Input 2
0 25 3
Output 2
9

Example 3

Input 3
2040 2050 5
Output 3
2
Explanation

Only 20442044 and 20492049 have digit sum divisible by 55.

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.