fun main(args: Array<String>) {
    val (a1, a2, a3) = readLine()!!.split(' ').map(String::toInt)
    val c = intArrayOf(
        Math.abs(a1 - a2),
        Math.abs(a2 - a3),
        Math.abs(a3 - a1)
    ).sorted().dropLast(1).sum()
    println(c)
}
