The ledger master Fiora has been asked to publish the quarterly findings. On the desk lies a long table of vials readings. 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 <= 14097; 0 <= a[i],x <= 1000.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 14097; 0 <= a[i],x <= 1000.
