a, b, c = map(int, input().split())

d = min(abs(a-b), abs(b-c), abs(a-c))
print(d)