'use strict'

function Main(input) {
  let line = input.split(' ').map(x => Number(x));
  line.sort();

  let answer = 0;

  answer = Math.abs(line[1] - line[0]) + Math.abs(line[2] - line[1]);

  console.log(answer);

}

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