fun main(args: Array<String>) {
    val tasks = readLine()!!.split(' ').map { it.toInt() }.sorted()
    var cost = 0
    for (i in (1..2)) {
        cost += (tasks[i] - tasks[i - 1])
    }
    println(cost)
}