TV Producer

 

Program

TV.C, TV.CPP, TV.PAS

In Hedionia one of the most popular sport events are triathlon competitions. To attend such a competition, Hedonians must go through an extremely rough training, so a triathlon competition was never a massive sport event, also due to the fact that it is also a little bit dangerous (swimming in the water with sharks, bicycling on the extremely narrow roads, just few centimetres apart from dangerous cliffs and running through desert with areas of live sand). Also all competitors are good, so the outcome of each race is completely uncertain. Eruj is an ambitious sports producer on National Hedonia TV (NHTV). He has got the trust to monitor all the triathlon competitions in Hedonia, and he is firmly convinced that he will show off to his boss. This shall be the best production ever and then it is not enough just to show the finish of the winner in slow motion, accompanied with violin music and rhythmic waggling slime in the beard. A new much more genius idea occurred to Eruj. He knew that the most appealing event in triathlon is when a contestant finishes his swimming part and starts bicycling. So he decided to show also the arrival from the water and the start of the bicycling of the winner, preferable to the tones of Strauss's Also sprach Zaratustra. In order to be sure to get enough footage of the winner he must film each competitor for at least one minute during the start of bicycling. But the competitors arrive from swimming at uneven intervals and probably not at the same speed. Therefore one TV-camera has to be dedicated to each competitor during his first minute after they got from the water. When one contestant has been filmed enough the camera can immediately be turned to another sportsman finishing the swimming. The finest producer as Eruj considers himself; he has decided to make a detailed investigation to make a qualified guess regarding the number of cameras needed. He has therefore gathered all the results of all triathlons during last 10 years. With analysing them he can make an educated guess about the number of cameras needed. It showed that at none of these events more than 200 sportsman finished the swimming part (due to hungry sharks perhaps?). How can you help Eruj to analyse these start lists so that he do not have to use more cameras than necessary?

Input

The input consists of several test cases, each representing the results of the swimming part of one triathlon. Every test case starts with a positive integer, n, the number of competitors, finished the swimming in each triathlon. Thereafter n - 1 rows follows with non-negative integers. The integer on row i tells the time distance in seconds between arrival of competitor i+1 and competitor i. So the first integer tells the difference between the first and the second in swimming, the second integer tells the difference between the second and the third and so on. The input is finished with a test case with n=0. For this test case no output shall be generated.

Output

The output for each test case consists of a row with an integer that tells the smallest number of cameras needed to cover all participants.

Sample Input
3
100
100
4
30
30
30
0

Sample Output
1
2