Iris runs the granary at the obsidian flows of Blackglass. Today the books show a list of shelves, and the numbers must be worked out before sundown. Task: Print the length of the longest run of consecutive integers present in the array (e.g. 4,5,6 counts as 3). Input format: First line: n. Second line: n integers. Output format: Print the longest consecutive run length. Constraints: 1 <= n <= 6703; -1000000 <= a[i],x <= 1000000.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 6703; -1000000 <= a[i],x <= 1000000.
