'use strict';

const receive = require('fs')
  .readFileSync('/dev/stdin', 'utf8')
  .split(/ /);

const main = input => {
  const A = input.map(x => Number(x));
  const arr = A.sort((x, y) => y - x);
  const ans = arr[0] - arr[2];
  console.log(ans);
};

main(receive);
