Kamina is interested in brotherly sequences. A brotherly sequence is a sequence ~B~ where for every index ~i~ between ~[2, N]~, ~|B[i-1]-B[i]| \le 2~. Given a sequence of numbers ~S~ of length ~N~ ~(3 \le N \le 100)~, what is the length of the longest contiguous brotherly subsequence it contains?
The first line of input will contain the integer ~N~.
The second line of input will contain ~N~ space-separated integers making up the sequence ~S~. The numbers in ~S~ are in the range ~[-1000, +1000]~.
The positive integer length of the longest contiguous brotherly subsequence in the sequence ~S~.
5 1 1 2 4 8
A subsequence of a sequence is a sequence that is formed by deleting some elements of the original sequence, but preserving the relative order of the remaining elements. A contiguous subsequence is a subsequence formed by deleting some prefix and some suffix of the sequence (possibly empty for either or both).