import sys readline=sys.stdin.readline a,b,c=map(int,list(readline().rstrip())) ans=max(a,b,c)-min(a,b,c) print(ans)