N = int(input()) a = list(map(int,input().split())) def calc(x): count = 0 now = 0 left = 0 while left < N: right = left while right < N and now + a[right] <= x: now += a[right] right += 1 if now < x: return 0 now = 0 count += 1 left = right return count ans = 0 Sum = 0 for i in a: Sum += i t = calc(Sum) if t > ans: ans = t print(ans)