a, b, c = map(int, input()) print(max(a, b, c) - min(a, b, c))