import sys x = int(sys.stdin.read(1)) y = int(sys.stdin.read(1)) z = int(sys.stdin.read(1)) print(max(x, y, z) - min(x, y, z))