'use strict'
const main = input => {
  const line = input.split(' ').map(v => v - 0)
  const cost = Math.max(...line) - Math.min(...line)
  console.log(cost)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
