Ber after winning the push-up competition. To achieve this, he did more than $$$250$$$ push-ups, with breaks of 30 seconds after every $$$50$$$. In Astana, Kazakhstan, in 2024, the 48th edition of the ICPC (International Collegiate Programming Contest) took place. Along with it, the first push-up marathon in the history of the competition was held. The great champion was Bernardo Archegas from UNICAMP.
As everyone knows, winning a push-up marathon is not easy at all. To achieve this feat, Bernardo had to train with great discipline. For this, he used the GymRats app, which works as follows: every day he goes to the gym and does push-ups, he logs a visit in the app. Additionally, the app shows the longest streak of consecutive days he went to the gym without missing.
Your task is to implement this functionality of the app. Given the list of days (in increasing order) that Bernardo went to the gym, determine the length of the longest streak of consecutive days he attended.
The first line contains an integer $$$N$$$ ($$$1 \leq N \leq 1000$$$), representing the number of days Bernardo went to the gym.
The second line contains $$$N$$$ distinct integers $$$1 \leq d_1 \lt d_2 \lt ... \lt d_N \leq 1000$$$, representing the days he went to the gym, in increasing order. The days are numbered such that $$$1$$$ is the first day Bernardo downloaded the app and day $$$d_N$$$ is the day of the competition.
Print a single integer representing the length of the longest streak of consecutive days Bernardo went to the gym.
62 5 6 7 10 11
3
510 100 101 102 103
4