using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static string InputPattern = "InputX";
static List<string> GetInputList()
{
var WillReturn = new List<string>();
if (InputPattern == "Input1") {
WillReturn.Add("5 3");
//5
}
else if (InputPattern == "Input2") {
WillReturn.Add("10 5");
//30
}
else if (InputPattern == "Input3") {
WillReturn.Add("100 100");
//190569292
}
else {
string wkStr;
while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
}
return WillReturn;
}
const int Hou = 1000000007;
static int mN;
static int mK;
static void Main()
{
List<string> InputList = GetInputList();
int[] wkArr = InputList[0].Split(' ').Select(pX => int.Parse(pX)).ToArray();
mN = wkArr[0];
mK = wkArr[1];
DerivePatternCnt();
}
static void DerivePatternCnt()
{
// 場合の数[和,項数]なDP表
int[,] DPArr = new int[mN + 1, mK + 1];
DPArr[0, 0] = 1;
// 使う数でループ
for (int I = 1; I <= mN; I++) {
for (int J = 0; J <= mN; J++) {
int NewJ = J + I;
if (NewJ > mN) break;
// 枝切り
if (NewJ != mN && J + I * 2 > mN) continue;
for (int K = 0; K <= mK; K++) {
if (DPArr[J, K] == 0) continue;
int NewK = K + 1;
if (NewK > mK) break;
DPArr[NewJ, NewK] += DPArr[J, K];
DPArr[NewJ, NewK] %= Hou;
}
}
}
int Answer = 0;
for (int I = 1; I <= mK; I++) {
Answer += DPArr[mN, I];
Answer %= Hou;
}
Console.WriteLine(Answer);
}
}