A queen is placed on an m \times n chessboard. Determine how many squares are under its attack.
Four positive integers: the size of the chessboard and , as well as the coordinates of the queen and (1 \le x \le m \le 10^9,\ 1 \le y \le n \le 10^9).
Print the number of squares under the queen's attack.
Example 1