s = io.read() a, b, c = s:byte(1), s:byte(2), s:byte(3) print(math.max(a, b, c) - math.min(a, b, c))