Rook
Execution time limit is 1 second
Runtime memory usage limit is 256 megabytes
Given a chessboard of size , that is, with rows and columns.
There is only one piece on this chessboard - a rook. It is located in the lower left corner. There are no other figures.
Remember, the rook can move any number of cells horizontally or vertically, but not diagonally, in one move.
Find the number of cells the rook can move in one move.
Input
The first line contains one integer ().
The second line contains one integer ().
Output
Print the number of cells the rook can move in one move.
Examples
Input #1
Answer #1
Input #2
Answer #2
Note
Explanation why the answer is in the first example can be seen on the picture above.
In the second example the answer is , as the rook can only move one cell up and two cells to the right.
Submissions 2
Acceptance rate 100%