Bishops#9630

Bishops

1 second
128 megabytes
Medium

A bishop in chess attacks all squares on the same diagonal (on both diagonals).

39s6y2.jpg

Shakhriyar placed bishops on a chessboard of size n \times n. Now he wants to count the number of squares that are not attacked by any bishop. Help Shakhriyar solve this problem.

Input

The first line contains two integers (1 \le n \le 10^6) — the size of the chessboard — and (1 \le m \le 10^5) — the number of bishops.

Each of the next lines contains two integers r_i and c_i (1 \le r_i, c_i \le n) — the row and column of the -th bishop. All bishops are placed on distinct squares.

Output

Print the number of squares that are not attacked by any bishop.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading