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