'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	const A = args[0].map(arg => parseInt(arg, 10)).sort((a, b) => a - b)
	let sum = 0
	sum += A[1] - A[0]
	sum += A[2] - A[1]
	console.log(sum)
}

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