#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int mult(int a, int b)
{
return a * (long long) b % mod;
}
int binpow(int a, int n)
{
int res = 1;
while(n)
{
if(n&1)
res = mult(res, a);
a = mult(a, a);
n /= 2;
}
return res;
}
int fact(int n)
{
int res = 1;
for(int i = 1; i <= n; i++)
res = mult(res, i);
return res;
}
int main()
{
int n, k;
cin >> n >> k;
int Up = fact(n + k - 1);
int Down = mult(fact(n), fact(k - 1));
Down = binpow(Down, mod - 2);
cout << mult(Up, Down) << endl;
return 0;
}