import java.util.Arrays;
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int[] a = new int[3];
    for (int i = 0; i < a.length; i++) {
      a[i] = scanner.nextInt();
    }
    Arrays.sort(a);
    int cost = 0;
    for (int i = 1; i < a.length; i++) {
      cost += a[i] - a[i - 1];
    }
    System.out.println(cost);
  }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int[] a = new int[3];
    for (int i = 0; i < a.length; i++) {
      a[i] = scanner.nextInt();
    }
    Arrays.sort(a);
    int cost = 0;
    for (int i = 1; i < a.length; i++) {
      cost += a[i] - a[i - 1];
    }
    System.out.println(cost);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int[] a = new int[3];
    for (int i = 0; i < a.length; i++) {
      a[i] = scanner.nextInt();
    }
    Arrays.sort(a);
    int cost = 0;
    for (int i = 1; i < a.length; i++) {
      cost += a[i] - a[i - 1];
    }
    System.out.println(cost);
  } main {
    Scanner scanner = new Scanner(System.in);
    int[] a = new int[3];
    for (int i = 0; i < a.length; i++) {
      a[i] = scanner.nextInt();
    }
    Arrays.sort(a);
    int cost = 0;
    for (int i = 1; i < a.length; i++) {
      cost += a[i] - a[i - 1];
    }
    System.out.println(cost);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int[] a = new int[3]; a new int[3] 3 for (int i = 0; i < a.length; i++) {
      a[i] = scanner.nextInt();
    } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
      a[i] = scanner.nextInt();
    } {
      a[i] = scanner.nextInt();
    } a[i] = scanner.nextInt() a[i] a i scanner.nextInt() scanner.nextInt scanner Arrays.sort(a) Arrays.sort Arrays a int cost = 0; cost 0 for (int i = 1; i < a.length; i++) {
      cost += a[i] - a[i - 1];
    } int i = 1; int i = 1; i 1 i < a.length i a.length a a.length i++ i++ i {
      cost += a[i] - a[i - 1];
    } {
      cost += a[i] - a[i - 1];
    } cost += a[i] - a[i - 1] cost a[i] - a[i - 1] a[i] a i a[i - 1] a i - 1 i 1 System.out.println(cost) System.out.println System.out System System.out cost String[] args args
import java.util.Arrays;
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int[] a = new int[3];
    for (int i = 0; i < a.length; i++) {
      a[i] = scanner.nextInt();
    }
    Arrays.sort(a);
    int cost = 0;
    for (int i = 1; i < a.length; i++) {
      cost += a[i] - a[i - 1];
    }
    System.out.println(cost);
  }
}
