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