import java.util.*;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int data[] = new int[3];

    for (int i = 0 ; i < 3 ; i++ ) {
      data[i] = sc.nextInt();
    }

    Arrays.sort(data);

    int x = Math.abs(data[0] - data[1]);
    int y = Math.abs(data[1] - data[2]);
    System.out.println(x + y);
  }
} import java.util.*; util.* java public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int data[] = new int[3];

    for (int i = 0 ; i < 3 ; i++ ) {
      data[i] = sc.nextInt();
    }

    Arrays.sort(data);

    int x = Math.abs(data[0] - data[1]);
    int y = Math.abs(data[1] - data[2]);
    System.out.println(x + y);
  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int data[] = new int[3];

    for (int i = 0 ; i < 3 ; i++ ) {
      data[i] = sc.nextInt();
    }

    Arrays.sort(data);

    int x = Math.abs(data[0] - data[1]);
    int y = Math.abs(data[1] - data[2]);
    System.out.println(x + y);
  } main {

    Scanner sc = new Scanner(System.in);
    int data[] = new int[3];

    for (int i = 0 ; i < 3 ; i++ ) {
      data[i] = sc.nextInt();
    }

    Arrays.sort(data);

    int x = Math.abs(data[0] - data[1]);
    int y = Math.abs(data[1] - data[2]);
    System.out.println(x + y);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int data[] = new int[3]; data new int[3] 3 for (int i = 0 ; i < 3 ; i++ ) {
      data[i] = sc.nextInt();
    } int i = 0 ; int i = 0 ; i 0 i < 3 i 3 i++ i++ i {
      data[i] = sc.nextInt();
    } {
      data[i] = sc.nextInt();
    } data[i] = sc.nextInt() data[i] data i sc.nextInt() sc.nextInt sc Arrays.sort(data) Arrays.sort Arrays data int x = Math.abs(data[0] - data[1]); x Math.abs(data[0] - data[1]) Math.abs Math data[0] - data[1] data[0] data 0 data[1] data 1 int y = Math.abs(data[1] - data[2]); y Math.abs(data[1] - data[2]) Math.abs Math data[1] - data[2] data[1] data 1 data[2] data 2 System.out.println(x + y) System.out.println System.out System System.out x + y x y String[] args args public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int data[] = new int[3];

    for (int i = 0 ; i < 3 ; i++ ) {
      data[i] = sc.nextInt();
    }

    Arrays.sort(data);

    int x = Math.abs(data[0] - data[1]);
    int y = Math.abs(data[1] - data[2]);
    System.out.println(x + y);
  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int data[] = new int[3];

    for (int i = 0 ; i < 3 ; i++ ) {
      data[i] = sc.nextInt();
    }

    Arrays.sort(data);

    int x = Math.abs(data[0] - data[1]);
    int y = Math.abs(data[1] - data[2]);
    System.out.println(x + y);
  }
} Main
import java.util.*;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int data[] = new int[3];

    for (int i = 0 ; i < 3 ; i++ ) {
      data[i] = sc.nextInt();
    }

    Arrays.sort(data);

    int x = Math.abs(data[0] - data[1]);
    int y = Math.abs(data[1] - data[2]);
    System.out.println(x + y);
  }
}
