function f(x, y, z){ return Math.abs(y - x) + Math.abs(y - z); }
function main(input){
	input = input.split(' ').map(Number);
	a = input[0], b = input[1], c = input[2], d = 1000001;
	if (f(a, b, c) < d) d = f(a, b, c);
	if (f(a, c, b) < d) d = f(a, c, b);
	if (f(b, a, c) < d) d = f(b, a, c);
	if (f(b, c, a) < d) d = f(b, c, a);
	if (f(c, a, b) < d) d = f(c, a, b);
	if (f(c, b, a) < d) d = f(c, b, a);
	console.log(d);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));