function Main(input) {
	input = input.trim().split(" ").map((a)=>Number(a));
  input.sort(function(a,b){
  	return b - a;
  });
  var output = 0;
  output += Math.abs(input[0] - input[1]);
  output += Math.abs(input[2] - input[1]);
  console.log(output);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
