import java.util.Scanner

fun sort(A: IntArray): IntArray{
	val N = A.size

	for(i in 1..N-1){
		val v = A[i]
		var j = i-1

		while(j>=0 && A[j]>v){
			A[j+1] = A[j]
			j--
		}

		A[j+1] = v
	}

	return A
}

fun main(args: Array<String>){
	val sc = Scanner(System.`in`)

	val s = sc.nextLine().split(" ")
	val N = s.size
	val A = IntArray(N)
	for(i in 0..N-1) A[i] = Integer.parseInt(s[i])

	val sorted = sort(A)
	
	var count = 0
	for(i in 1..N-1) count += sorted[i]-sorted[i-1]

	println(count)

}