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