You are given an array A consisting of N integers.
An index of the array i (1<i<N) is called :
You want to obtain an array such that it does not contain any local maximums and local minimums. To do that, you can do the following operation any number of times:
Find the maximum length of the final array A which does not contain any local maximums and local minimums.
Input format
Output format
For each test case, print the maximum length of the final array A which does not contain any local maximums and local minimums.
Constraints
1≤T≤1051≤N≤2⋅1051≤Ai≤NSumofNoveralltestcasesdoesnotexceed2⋅105.
The first test case
The second test case