import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    Integer num[] = new Integer[3];
    num[0] = sc.nextInt();
    num[1] = sc.nextInt();
    num[2] = sc.nextInt();
    Arrays.sort(num, Collections.reverseOrder());
    System.out.println(Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1]));
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    Integer num[] = new Integer[3];
    num[0] = sc.nextInt();
    num[1] = sc.nextInt();
    num[2] = sc.nextInt();
    Arrays.sort(num, Collections.reverseOrder());
    System.out.println(Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1]));
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    Integer num[] = new Integer[3];
    num[0] = sc.nextInt();
    num[1] = sc.nextInt();
    num[2] = sc.nextInt();
    Arrays.sort(num, Collections.reverseOrder());
    System.out.println(Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1]));
  } main {
    Scanner sc = new Scanner(System.in);
    Integer num[] = new Integer[3];
    num[0] = sc.nextInt();
    num[1] = sc.nextInt();
    num[2] = sc.nextInt();
    Arrays.sort(num, Collections.reverseOrder());
    System.out.println(Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1]));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Integer num[] = new Integer[3]; num new Integer[3] 3 num[0] = sc.nextInt() num[0] num 0 sc.nextInt() sc.nextInt sc num[1] = sc.nextInt() num[1] num 1 sc.nextInt() sc.nextInt sc num[2] = sc.nextInt() num[2] num 2 sc.nextInt() sc.nextInt sc Arrays.sort(num, Collections.reverseOrder()) Arrays.sort Arrays num Collections.reverseOrder() Collections.reverseOrder Collections System.out.println(Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1])) System.out.println System.out System System.out Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1]) Math.abs(num[0]-num[1]) Math.abs Math num[0]-num[1] num[0] num 0 num[1] num 1 Math.abs(num[2]-num[1]) Math.abs Math num[2]-num[1] num[2] num 2 num[1] num 1 String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    Integer num[] = new Integer[3];
    num[0] = sc.nextInt();
    num[1] = sc.nextInt();
    num[2] = sc.nextInt();
    Arrays.sort(num, Collections.reverseOrder());
    System.out.println(Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1]));
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    Integer num[] = new Integer[3];
    num[0] = sc.nextInt();
    num[1] = sc.nextInt();
    num[2] = sc.nextInt();
    Arrays.sort(num, Collections.reverseOrder());
    System.out.println(Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1]));
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    Integer num[] = new Integer[3];
    num[0] = sc.nextInt();
    num[1] = sc.nextInt();
    num[2] = sc.nextInt();
    Arrays.sort(num, Collections.reverseOrder());
    System.out.println(Math.abs(num[0]-num[1])+Math.abs(num[2]-num[1]));
  }
}