import java.util.Scanner

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

    var a=IntArray(3)
    var x:Int=0
    var y=0
    var z=0
    var n=0
    var sum=0

    for (i in 0..2){
        a[i]=scanner.nextInt()
    }

    for (j in 0..2){
        if (x<a[j]){
            x=a[j]
            n=j
        }
    }

    var d=(n+2)%3
    var e=(n+1)%3

    if (a[d]<a[e]){
        y=a[e]
        z=a[d]
    }
    else{
        y=a[d]
        z=a[e]
    }

    var sa1=x-y
    var sa2=y-z

    if (sa1<0) sa1=sa1*-1
    if (sa2<0) sa2=sa2*-1

    sum=sa1+sa2
    println(sum)
}