favorite We need a little bit of your help to keep things running, click on this banner to learn more


Tired of the unusually warm winter the residents of Sudislavl decided to find out whether this is a long thaw in the history of weather observations. They appealed to the forecasters, and those, in turn, do research statistics for previous years. They are interested in how many days it lasted the longest thaw.

The thaw is a period when the daily average temperature exceeds 0 degrees Celsius. Write a program that helps forecasters to work.


First given the number of observed days n (1n100). The next line gives n integers. Each number is the average temperature on the corresponding day. Temperatures are integers in the range from -50 to 50.


Print one number - the length of the longest thaw, which is the largest number of consecutive days during which the average daily temperature exceeded 0 degrees. If each day the temperature was non-positive, output 0.

Time limit 1 second
Memory limit 122.17 MiB
Input example #1
-20 30 -40 50 10 -10
Output example #1