#include <bits/stdc++.h>
#define endl '\n'
#define modulo 10000007
#define int long long
using namespace std;
///Solution created by:Ahmadsm2005
int maxer;
int DP[101][101];
int Recursion(int n,int m){
if(m<0){
return 0;
}
if(n==maxer&&!m)
return 1;
else if(n==maxer){
return 0;
}
if(DP[n][m]+1)
return DP[n][m]%modulo;
DP[n][m]=0;
for(int i=1;i<=m;i++){
DP[n][m]+=(Recursion(n+1,m-i))%modulo;
}
return DP[n][m];
}
int32_t main()
{
iostream::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int m;
for(int i=0;i<101;i++)
for(int l=0;l<101;l++)
DP[i][l]=-1;
cin>>m>>maxer;
cout<<(Recursion(0,m)?Recursion(0,m):-1);
return 0;
}
ICAgICAgICAjaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KICAgICAgICAjZGVmaW5lIGVuZGwgJ1xuJwogICAgICAgICNkZWZpbmUgbW9kdWxvIDEwMDAwMDA3CiAgICAgICAgI2RlZmluZSBpbnQgbG9uZyBsb25nCiAgICAgICAgdXNpbmcgbmFtZXNwYWNlIHN0ZDsKICAgICAgICAvLy9Tb2x1dGlvbiBjcmVhdGVkIGJ5OkFobWFkc20yMDA1CiAgICAgICAgaW50IG1heGVyOwogICAgICAgIGludCBEUFsxMDFdWzEwMV07CiAgICAgICAgaW50IFJlY3Vyc2lvbihpbnQgbixpbnQgbSl7CiAgICAgICAgaWYobTwwKXsKICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICAgICAgaWYobj09bWF4ZXImJiFtKQogICAgICAgIHJldHVybiAxOwogICAgICAgIGVsc2UgaWYobj09bWF4ZXIpewogICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgICAgICBpZihEUFtuXVttXSsxKQogICAgICAgIHJldHVybiBEUFtuXVttXSVtb2R1bG87CiAgICAgICAgRFBbbl1bbV09MDsKICAgICAgICBmb3IoaW50IGk9MTtpPD1tO2krKyl7CiAgICAgICAgRFBbbl1bbV0rPShSZWN1cnNpb24obisxLG0taSkpJW1vZHVsbzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIERQW25dW21dOwogICAgICAgIH0KICAgICAgICBpbnQzMl90IG1haW4oKQogICAgICAgIHsKICAgICAgICAgICAgaW9zdHJlYW06OnN5bmNfd2l0aF9zdGRpbygwKTsKICAgICAgICAgICAgY2luLnRpZSgwKTsKICAgICAgICAgICAgY291dC50aWUoMCk7CiAgICAgICAgICAgIGludCBtOwogICAgICAgICAgICBmb3IoaW50IGk9MDtpPDEwMTtpKyspCiAgICAgICAgICAgIGZvcihpbnQgbD0wO2w8MTAxO2wrKykKICAgICAgICAgICAgRFBbaV1bbF09LTE7CiAgICAgICAgICAgIGNpbj4+bT4+bWF4ZXI7CiAgICAgICAgICAgIGNvdXQ8PChSZWN1cnNpb24oMCxtKT9SZWN1cnNpb24oMCxtKTotMSk7CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0K