Almost Rectangle

From Codeforces. Finding missing corners to form axis-aligned rectangle. Solve the geometry problem "Almost Rectangle".

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

Almost Rectangle

**From Codeforces.** Finding missing corners to form axis-aligned rectangle. Solve the geometry problem "Almost Rectangle".