Given an array of length n. The task is to make the sum of all the subarrays of length greater than two positive. To do this, you can replace any element with any integer x where -10^18 < x < 10^18. Find the minimum number of replacements needed to make the array positive.
Constraints: -10^9 < arr[i] < 10^9 and n < 10^5
Example:
Test Case 1: Arr = [-80 100 -80] Ans = 1
Test Case 2: Arr = [-10 19 -10 2] Ans = 1 (by making arr[2] = 10^18)