ABC = sorted(map(int, input().split())) print(min(ABC[x+1] - ABC[x] for x in range(2)))