题目描述
Problem Description
Iroha-chan shouted a string consisting of A and B.
The string contains \(N\\) As and \(M\\) Bs, making it a string of length \(N+M\\), where the first character is A and the last character is B.
It is also known that the string contains the substring AAA (consecutive).
How many possible strings could Iroha-chan have shouted? Find the number of possible strings modulo \(10^9+7\\).
Input Format
The input is given in the following format:
$N\ M$
Output Format
Output the answer in one line.
Sample Input and Output
Sample Input #1
4 3
Sample Output #1
5
Sample Input #2
3 12
Sample Output #2
1
Sample Input #3
2 1000
Sample Output #3
0
Sample Input #4
11451 41919
Sample Output #4
538542250
Notes/Hints
Constraints
- All inputs are integers.
- \(1≦N, M≦10^5\\)
Sample Explanation 1
The strings that satisfy the conditions are AAAABBB, AAABABB, ABBAAAB, AAABBAB, ABAAABB, totaling 5.
Sample Explanation 2
The only string that satisfies the conditions is AAABBBBBBBBBBBB.
Sample Explanation 3
No string satisfies the conditions.
Sample Explanation 4
Output the result modulo \(10^9+7\\).
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分