import sys input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) mi = lambda: map(int, input().split()) li = lambda: list(mi()) a, b, c = map(int, input()) print(max(a, b, c) - min(a, b, c))