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