B. Bishop Paths
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

There is a bishop on a chessboard of size $$$n$$$ x $$$n$$$. In one move, the bishop can move any number of cells diagonally.

Determine the number of possible paths for the bishop from cell ($$$x_1$$$, $$$y_1$$$) to cell ($$$x_2$$$, $$$y_2$$$) with the minimum number of moves.

Input

The first line of input contains an integer $$$n$$$ - the size of the board ($$$1 \le n \le 10^{9}$$$). The second line of input contains two integers $$$x_1$$$ and $$$y_1$$$, and the third line contains two integers $$$x_2$$$ and $$$y_2$$$ ($$$1 \le x_1, y_1, x_2, y_2 \le n$$$).

Output

Output a single integer - the number of different paths containing the minimum number of moves.

Example
Input
5
3 2
4 5
Output
2
Note

Illustration for the example in the statement: