munan的传球游戏
题号:NC214195
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Mn is playing a passing game.

The rules of the game are as follows: n people stand in a circle, one of them holds a ball in his hand. When the referee blows his whistle, he starts to pass the ball. Each person can pass the ball to one of the two people on his left and right (at random). When the referee blows his whistle again, the pass stops. At this time, the person who does not pass the ball is the loser, and he has to perform a program for everyone.

Mn thought of a question: how many different passing methods can make the ball from Mn's hand pass m times and then return to his hand? The two passing methods are regarded as different methods, if and only if the sequence of people receiving the ball is different according to the order of receiving the ball. For example, there are three people: No. 1, No. 2 and No. 3. Assuming that Mn is No. 1, there are two ways to return the ball to Mn's hands after three passes: 1 - > 2 - > 3 - > 1 and 1 - > 3 - > 2 - > 1.

输入描述:

Input two integers n and m.(3<=n<=1000,1<=m<=1000).

输出描述:

Output a number, which is the number of methods in this question.Maybe the answer is very large, please modulo 1e9+7.
示例1

输入

复制
3 3

输出

复制
2