S, M, L = sorted(map(int, input().split())) ans = min(L - M ,M -S) print(ans)