The Closest Distance

From CSES. Shoelace formula / polygon area. Solve the geometry problem "The Closest Distance".

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

The Closest Distance

**From CSES.** Shoelace formula / polygon area. Solve the geometry problem "The Closest Distance".