题目描述
Problem Background
As the high school entrance examination approaches, pG's homeroom teacher decides to have a physical education class to relax.
Problem Description
The teacher organizes a ball-passing game with pG and his classmates.
The rules of the game are as follows: $n$ students stand in a circle, with one student holding a ball. When the teacher blows the whistle, the ball starts to be passed. Each student can pass the ball to either of the two students on their left or right (at their discretion). When the teacher blows the whistle again, the ball passing stops. The student who is holding the ball without passing it is the loser and has to perform a show for everyone.
pG poses an interesting question: How many different ways are there to pass the ball such that the ball, starting from pG's hands, returns to pG after being passed $m$ times? Two passing methods are considered different if and only if the sequences of students who receive the ball are different. For example, with three students numbered 1, 2, and 3, and assuming pG is number 1, there are two ways for the ball to be passed back to pG after three passes: $1 \to 2 \to 3 \to 1$ and $1 \to 3 \to 2 \to 1$.
Input Format
A line containing two integers $n$ and $m$ separated by a space.
Output Format
A single integer representing the number of valid methods, modulo $10^9+7$.
Sample Input and Output
Sample Input #1
3 3
Sample Output #1
2
Sample Input #2
30 30
Sample Output #2
155117522
Sample Input #3
1234 12345678
Sample Output #3
424074635
Notes
For 8% of the data, $n \le 100, m \le 10^4$.
For 100% of the data, $n \le 3500, m \le 10^9$.
The data has a certain gradient.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分