#P1272D. Remove One Element
Remove One Element
No submission language available for this problem.
Description
You are given an array consisting of integers.
You can remove at most one element from this array. Thus, the final length of the array is or .
Your task is to calculate the maximum possible length of the strictly increasing contiguous subarray of the remaining array.
Recall that the contiguous subarray with indices from to is . The subarray is called strictly increasing if .
The first line of the input contains one integer () — the number of elements in .
The second line of the input contains integers (), where is the -th element of .
Print one integer — the maximum possible length of the strictly increasing contiguous subarray of the array after removing at most one element.
Input
The first line of the input contains one integer () — the number of elements in .
The second line of the input contains integers (), where is the -th element of .
Output
Print one integer — the maximum possible length of the strictly increasing contiguous subarray of the array after removing at most one element.
Samples
Note
In the first example, you can delete . Then the resulting array will be equal to and the length of its largest increasing subarray will be equal to .