There is a queen on the chessboard of size m×n. How many squares does the queen attack?
Four positive integers: the size of the chessboard m and n and the queen's coordinates x and y (1≤x≤m≤109,1≤y≤n≤109).
Print the number of squares the queen attacks.