A, B, C = map(int, input().split()) l = [] l.append(abs(A - B)) l.append(abs(B - C)) l.append(abs(C - A)) print(min(l))