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