these operations optimally to makethe resultant array non-decreasing. For example, given the array A: [1, 4, 2, 6, 9], you can choose the

You are given an array A consisting of N positive numbers. You can perform any number of operations, where each operation involves selecting a subarray of the array and replacing it with its sum. Your task is to perform these operations optimally to
makethe resultant array non-decreasing.

For example, given the array A: [1, 4, 2, 6, 9], you can choose the subarray A[3, 4] replace it with its sum, resulting in A: [1, 4, 8, 9]. In this case, only one operation and was needed to make the array non-decreasing.

Input Format

The first line contains an integer, where n denotes the number of elements in the array in the array. The second line contains n space-separated integers.

Output Format

Print a number that denotes the maximum length of the non-decreasing array after
performing the above operations.