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

public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in)) {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    }
  }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in)) {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    }
  }
} Main public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in)) {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    }
  } main {
    try (Scanner sc = new Scanner(System.in)) {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    }
  } try (Scanner sc = new Scanner(System.in)) {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    } {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int[] A = new int[3]; A new int[3] 3 for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
        A[i] = sc.nextInt();
      } {
        A[i] = sc.nextInt();
      } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc Arrays.sort(A) Arrays.sort Arrays A int result = 0; result 0 for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      } int i = 1; int i = 1; i 1 i < 3 i 3 i++ i++ i {
        result = result + Math.abs(A[i-1]-A[i]);
      } {
        result = result + Math.abs(A[i-1]-A[i]);
      } result = result + Math.abs(A[i-1]-A[i]) result result + Math.abs(A[i-1]-A[i]) result Math.abs(A[i-1]-A[i]) Math.abs Math A[i-1]-A[i] A[i-1] A i-1 i 1 A[i] A i System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in)) {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    }
  }
} public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in)) {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    }
  }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    try (Scanner sc = new Scanner(System.in)) {
      int[] A = new int[3];
      for (int i = 0; i < 3; i++) {
        A[i] = sc.nextInt();
      }
      Arrays.sort(A);
      int result = 0;
      for (int i = 1; i < 3; i++) {
        result = result + Math.abs(A[i-1]-A[i]);
      }

      System.out.println(result);
    }
  }
}
