ABC = sorted(map(int, input().split())) print(min([ABC[2] - ABC[1], ABC[1] - ABC[0]]))