A, B, C = map(int, input().split())

print(min(abs(A - C), abs(A - B), abs(C - B)))