K = list(map(int, input().split())) K.sort() print(min(K[2] - K[1], K[1] - K[0]))