The Lazy Student

From Codeforces. Prefix sums on array values. Solve the geometry problem "The Lazy Student".

Examples
Input: [1,2,3]
Output: 0
Hints

The Lazy Student

**From Codeforces.** Prefix sums on array values. Solve the geometry problem "The Lazy Student".