Shapes (ABC218 C)

From AtCoder. 90 rotation + translation matching. Solve the geometry problem "Shapes (ABC218 C)".

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

Shapes (ABC218 C)

**From AtCoder.** 90 rotation + translation matching. Solve the geometry problem "Shapes (ABC218 C)".