a, b, c = io.read("*n", "*n", "*n") if a < b then print(math.min(math.abs(a - c), math.min(b - a, b - c))) else print(math.min(math.abs(a - c), math.min(a - b, c - b))) end