#include using namespace std; typedef long long ll; int main(){ int n,l; cin>>n>>l; const ll mod=1e9+7; ll dp[n+1]; dp[0]=1; dp[1]=1; for(int i=2;i<=n;i++){ dp[i]=0; for(int j=1;j<=l;j++){ if(i-j<0)break; dp[i]+=dp[i-j]; dp[i]%=mod; } } cout<