#include using namespace std; const int off=10000; const long mod=1e9+7; long dp[20202]; int N,K; main() { cin>>N>>K; dp[off]=1; for(int i=0;i>A;A-=K; if(A>=0) { for(int j=20201;j>=A;j--)(dp[j]+=dp[j-A])%=mod; } else { for(int j=-A;j<20202;j++)(dp[j+A]+=dp[j])%=mod; } } long ans=mod-1; for(int j=off;j<20202;j++)ans+=dp[j]; cout<