import scala.io.StdIn

object Main extends App {

  val a = StdIn.readLine().split(" ").map(_.toInt)
  val s = Vector((a(0) - a(1)).abs, (a(1) - a(2)).abs, (a(2) - a(0)).abs)
  val r = if (s(0) >= s(1) && s(0) >= s(2)) s(1) + s(2)
  else if (s(1) >= s(0) && s(1) >= s(2)) s(0) + s(2)
  else s(0) + s(1)

  println(r)
}
