Alan is extremely good at chess. So much so that beating his opponents has gotten boring. Thus, Alan has begun playing a new version of chess on an infinite chessboard. Often in these games, Alan must maneuver his knight from some square (which we will define to be ) to another square . Alan wants to know how many ways there are to do so in moves. Can you help him?
In chess, a knight can move from to or .
Input Specification
The only line of input will contain integers: .
Output Specification
The only line of output is to contain integer: the number of ways modulo .
Subtasks
Subtask 1 (5%)
Subtask 2 (95%)
No further constraints.
Sample Input
2 0 0
Sample Output
8
Sample Explanation
Alan can make any valid knight move, and then undo it.
Valid moves include:
Comments