L-shapes

From Codeforces. Grid shape recognition. Solve the geometry problem "L-shapes".

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

L-shapes

**From Codeforces.** Grid shape recognition. Solve the geometry problem "L-shapes".