

fun main(args : Array<String>){
    val (a,b,c) = readLine()!!.split(' ').map{ it.toInt() }
    val A = Math.abs(a - b) + Math.abs(b - c)
    val B = Math.abs(a - c) + Math.abs(b - c)
    val C = Math.abs(a - b) + Math.abs(a - c)

    println(Math.min(A,Math.min(B,C)))
}
