A, B, C = map(int, input().split()) if A > C: A, C = C, A if A > B: print(A - B) else: print(B - C)