a, b, c = map(int, input().split()) shot_b = min(abs(a - b), abs(c - b)) shot_ac = abs(a - c) ans = min(shot_b, shot_ac) print(ans)