Amr and Pins

From Codeforces. Circle rolling distance. Solve the geometry problem "Amr and Pins".

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

Amr and Pins

**From Codeforces.** Circle rolling distance. Solve the geometry problem "Amr and Pins".