An integer sequence of length is given.
You may choose at most positions and replace the value at each chosen position with any integer. Let the resulting sequence be .
For , define the adjacent difference of the sequence as
For , the adjacent difference is defined to be .
Find the minimum possible adjacent difference after the allowed replacements.
The input is given from Standard Input in the following format:
For each test case, print the minimum possible adjacent difference on one line.
Each case is given in the following format:
| 3 | 21 | . |
| 4 | 23 |
|
| 5 | 34 | No additional constraints. |