a, b, c = map(int, input().split()) f = max(a, b, c) s = max(a, c) t = min(a, c) print(min(f-s,s-t))