import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    ArrayList<Integer> ar = new ArrayList<Integer>();

    for(int i=0;i<3;i++){
      int A = sc.nextInt();
      ar.add(A);
    }
    Collections.sort(ar);
    int task1 = ar.get(1) - ar.get(0);
    int task2 = ar.get(2) - ar.get(1);
    System.out.println(task1 + task2);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    ArrayList<Integer> ar = new ArrayList<Integer>();

    for(int i=0;i<3;i++){
      int A = sc.nextInt();
      ar.add(A);
    }
    Collections.sort(ar);
    int task1 = ar.get(1) - ar.get(0);
    int task2 = ar.get(2) - ar.get(1);
    System.out.println(task1 + task2);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    ArrayList<Integer> ar = new ArrayList<Integer>();

    for(int i=0;i<3;i++){
      int A = sc.nextInt();
      ar.add(A);
    }
    Collections.sort(ar);
    int task1 = ar.get(1) - ar.get(0);
    int task2 = ar.get(2) - ar.get(1);
    System.out.println(task1 + task2);
  } main {
    Scanner sc = new Scanner(System.in);
    ArrayList<Integer> ar = new ArrayList<Integer>();

    for(int i=0;i<3;i++){
      int A = sc.nextInt();
      ar.add(A);
    }
    Collections.sort(ar);
    int task1 = ar.get(1) - ar.get(0);
    int task2 = ar.get(2) - ar.get(1);
    System.out.println(task1 + task2);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> ar = new ArrayList<Integer>(); ar new ArrayList<Integer>() for(int i=0;i<3;i++){
      int A = sc.nextInt();
      ar.add(A);
    } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
      int A = sc.nextInt();
      ar.add(A);
    } {
      int A = sc.nextInt();
      ar.add(A);
    } int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc ar.add(A) ar.add ar A Collections.sort(ar) Collections.sort Collections ar int task1 = ar.get(1) - ar.get(0); task1 ar.get(1) - ar.get(0) ar.get(1) ar.get ar 1 ar.get(0) ar.get ar 0 int task2 = ar.get(2) - ar.get(1); task2 ar.get(2) - ar.get(1) ar.get(2) ar.get ar 2 ar.get(1) ar.get ar 1 System.out.println(task1 + task2) System.out.println System.out System System.out task1 + task2 task1 task2 String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    ArrayList<Integer> ar = new ArrayList<Integer>();

    for(int i=0;i<3;i++){
      int A = sc.nextInt();
      ar.add(A);
    }
    Collections.sort(ar);
    int task1 = ar.get(1) - ar.get(0);
    int task2 = ar.get(2) - ar.get(1);
    System.out.println(task1 + task2);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    ArrayList<Integer> ar = new ArrayList<Integer>();

    for(int i=0;i<3;i++){
      int A = sc.nextInt();
      ar.add(A);
    }
    Collections.sort(ar);
    int task1 = ar.get(1) - ar.get(0);
    int task2 = ar.get(2) - ar.get(1);
    System.out.println(task1 + task2);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    ArrayList<Integer> ar = new ArrayList<Integer>();

    for(int i=0;i<3;i++){
      int A = sc.nextInt();
      ar.add(A);
    }
    Collections.sort(ar);
    int task1 = ar.get(1) - ar.get(0);
    int task2 = ar.get(2) - ar.get(1);
    System.out.println(task1 + task2);
  }
}
