Rook
Given a chessboard of size . That is, with rows and columns.
On this chessboard, there is only one piece — the rook. It is located in the bottom left corner. There are no other pieces.
Recall that the rook can move any positive number of squares horizontally or vertically in one move, but not diagonally.
Find the number of squares to which the rook can move in exactly one move.
The picture shows a traditional chessboard of size . On it, the rook can move to all the squares marked in green. There are a total of such squares, so the answer is .
Input
The first line contains one integer ().
The second line contains one integer ().
Output
Output the number of squares to which the rook can move in one move.
Examples
Note
An explanation of why the answer is for the first example can be seen in the picture above.
In the second example, the answer is , because the rook can only move to one position to the right and two positions up.