function main(input) {
  var arr = []
  var input = input.split(" ")
  var result = 0
  input.forEach(function(element) {
  	arr.push(parseInt(element,10))
  })
  delete input
  arr.sort(function(a, b) {
    if (a > b) {
      return 1
    } else {
      return -1
    }
  })
  
  for (var i  = 1; i < arr.length; i++) {
    result += arr[i] - arr[i-1]
  }
  
  console.log(result);
  
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));