Minimum Distance

From Baekjoon. Minimum Manhattan distance on grid. Solve the geometry problem "Minimum Distance".

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

Minimum Distance

**From Baekjoon.** Minimum Manhattan distance on grid. Solve the geometry problem "Minimum Distance".