import scala.io.StdIn._
import scala.math._
object Main extends App{
  val sc = new java.util.Scanner(System.in)
  val a,b,c = sc.nextInt
  if(a<b){
    if(c<a){//cab
      print(abs(c-a)+abs(a-b))
    }
    else{
      if(b<c){//abc
        print(abs(a-b)+abs(b-c))
      }
      else{//acb
        print(abs(a-c)+abs(c-b))
      }
    }
  }
  else{
    if(c<b){//cba
      print(abs(c-b)+abs(b-a))
    }
    else{
      if(a<c){//bac
        print(abs(b-a)+abs(a-c))
      }
      else{//bca
        print(abs(b-c)+abs(c-a))
      }
    }
  }
}