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

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

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