Perpendicular Segments

From Codeforces. Perpendicular line construction. Solve the geometry problem "Perpendicular Segments".

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

Perpendicular Segments

**From Codeforces.** Perpendicular line construction. Solve the geometry problem "Perpendicular Segments".