#include<bits/stdc++.h>
using namespace std;
int DP[10010][100][2];
int main()
{
	string S;
	int N;
	cin>>S>>N;
	DP[0][0][1]=1;
	for(int i=0;i<S.length();i++)
		for(int j=0;j<N;j++)
		{
			for(int k=0;k<10;k++)
				DP[i+1][(j+k)%N][0]=(DP[i+1][(j+k)%N][0]+DP[i][j][0])%1000000007;
			for(int k=0;k<S[i]-'0';k++)
				DP[i+1][(j+k)%N][0]=(DP[i+1][(j+k)%N][0]+DP[i][j][1])%1000000007;
			DP[i+1][(j+S[i]-'0')%N][1]=(DP[i+1][(j+S[i]-'0')%N][1]+DP[i][j][1])%1000000007;
		}
	cout<<(DP[S.length()][0][0]+DP[S.length()][0][1]+1000000006)%1000000007;
	return 0;
}
### Prompt

Your task is to create a cpp solution to the following problem:

Find the number of integers between 1 and K (inclusive) satisfying the following condition, modulo 10^9 + 7:

* The sum of the digits in base ten is a multiple of D.

Constraints

* All values in input are integers.
* 1 \leq K < 10^{10000}
* 1 \leq D \leq 100

Input

Input is given from Standard Input in the following format:


K
D


Output

Print the number of integers satisfying the condition, modulo 10^9 + 7.

Examples

Input

30
4


Output

6


Input

1000000009
1


Output

2


Input

98765432109876543210
58


Output

635270834

### Response

```cpp
#include<bits/stdc++.h>
using namespace std;
int DP[10010][100][2];
int main()
{
	string S;
	int N;
	cin>>S>>N;
	DP[0][0][1]=1;
	for(int i=0;i<S.length();i++)
		for(int j=0;j<N;j++)
		{
			for(int k=0;k<10;k++)
				DP[i+1][(j+k)%N][0]=(DP[i+1][(j+k)%N][0]+DP[i][j][0])%1000000007;
			for(int k=0;k<S[i]-'0';k++)
				DP[i+1][(j+k)%N][0]=(DP[i+1][(j+k)%N][0]+DP[i][j][1])%1000000007;
			DP[i+1][(j+S[i]-'0')%N][1]=(DP[i+1][(j+S[i]-'0')%N][1]+DP[i][j][1])%1000000007;
		}
	cout<<(DP[S.length()][0][0]+DP[S.length()][0][1]+1000000006)%1000000007;
	return 0;
}
```