Vlad and Shapes

From Codeforces. Grid shape recognition. Solve the geometry problem "Vlad and Shapes".

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

Vlad and Shapes

**From Codeforces.** Grid shape recognition. Solve the geometry problem "Vlad and Shapes".