There are opposing pieces on an grid. All other cells are empty.
You want to place a cannon in one empty cell. The cannon chooses one of the four directions: up, down, left, or right. It must jump over the nearest piece in that direction. To capture a piece in one move, it lands on the second-nearest piece in that direction. Thus, exactly one other piece must lie strictly between the starting cell and the captured piece. If fewer than two pieces lie in a direction, no capture is possible in that direction.
Count the empty cells from which the cannon can capture an opposing piece in one move. Count each cell only once, even if a capture is possible in several directions. The cannon cannot be placed on an occupied cell.
The input is given from Standard Input in the following format:
Print the number of empty cells satisfying the condition.
The board has rows and columns. Piece is at row , column . Rows are numbered from top to bottom and columns from left to right, starting at .