Sequence#2012

Sequence

1 second
128 megabytes
Very easy

Given a sequence of natural numbers, find the length of its longest contiguous subsequence in which each element is exactly one greater than the previous one.

Input

The first line contains the number of elements (1 \leq n \leq 10^5). The second line contains integers a_i (1 \leq a_i \leq 10^6), separated by spaces.

Output

Print a single integer: the maximum length of a contiguous subsequence where each element is one greater than the previous.

Examples

Example 1

Loading
Loading