jkrt wants to cover a board of length exactly with tiles.
Choose two distinct positive integers and , and place tiles of lengths and alternately. Both the first and the last tile must have length , and each of the two tile lengths must be used at least once.
Find the number of ordered pairs for which the board can be covered exactly without overlaps or extending beyond the board.
The input is given from Standard Input in the following format:
For each test case, print the number of valid ordered pairs on one line.
For , the only valid ordered pair is . Tiles of lengths cover the board exactly.
Each case is given in the following format:
| 3 | 47 | No additional constraints. |