function main(input) {
  const ary = input.split(' ').sort().map(n => parseInt(n, 10));
  console.log(Math.abs(ary[0] -ary[1]) + Math.abs(ary[1] - ary[2]));
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));