Điểm:
400
Thời gian:
1.0s
Bộ nhớ:
256M
Input:
bàn phím
Output:
màn hình
There are \(2n\) students in a school. Calculate the number of ways pick a group of at least 2 students so that for pair of
students a and b in this group, \(|a − b| \ne 1\) and \(|a − b| \ne n + x\).
Input
- The first line of input contains 2 integers \(n\) and \(x (1 \le n \le 10^{18}, 0 \le x \le n)\).
Output
- Output a single integer, the answer to the problem modulo \(10^9 + 7\).
Example
Test 1
Input
2 1
Output
2
Note
In the sample test case, we can pick {1, 3} or {2, 4}.
Bình luận