const main = stdin => {
  const input = stdin.trim().split('\n')
  const tasks = input[0].split(' ').map(x => parseInt(x)).sort((a, b) => a - b)

  console.log(Math.abs(tasks[0] - tasks[1]) + Math.abs(tasks[1] - tasks[2]))
}


// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
