#agc051c. [agc051_c]Flipper
[agc051_c]Flipper
Problem Statement
There is a square grid of dimensions . The cells are numbered through . Cell is in the -th row from the top, and the -th column from the left. Initially, cells are black, and all other cells are white.
Snuke can perform the following operation an arbitrary number of times:
- Choose an integer and an integer , and flip (black to white, white to black) the colors of the following six cells:
Compute the minimum possible number of black cells after the operations.
Constraints
- are pairwise distinct.
- All values in the input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
Sample Output 1
In the diagram below, the -th letter of the -th string from the top represents the cell . #
is black, .
is white.