import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[3];
        int min = 101;
        for (int i = 0; i < 3; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < 3; i++) {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        }
        System.out.println(min);
    }
} 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];
        int min = 101;
        for (int i = 0; i < 3; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < 3; i++) {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        }
        System.out.println(min);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[3];
        int min = 101;
        for (int i = 0; i < 3; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < 3; i++) {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        }
        System.out.println(min);
    } main {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[3];
        int min = 101;
        for (int i = 0; i < 3; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < 3; i++) {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        }
        System.out.println(min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a[] = new int[3]; a new int[3] 3 int min = 101; min 101 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 for (int i = 0; i < 3; i++) {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        } {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        } int total = 0; total 0 for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                if (i != j) total += Math.abs(a[i] - a[j]);
            } {
                if (i != j) total += Math.abs(a[i] - a[j]);
            } if (i != j) total += Math.abs(a[i] - a[j]); i != j i j total += Math.abs(a[i] - a[j]) total Math.abs(a[i] - a[j]) Math.abs Math a[i] - a[j] a[i] a i a[j] a j if (total < min) min = total; total < min total min min = total min total System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[3];
        int min = 101;
        for (int i = 0; i < 3; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < 3; i++) {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        }
        System.out.println(min);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[3];
        int min = 101;
        for (int i = 0; i < 3; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < 3; i++) {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        }
        System.out.println(min);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[3];
        int min = 101;
        for (int i = 0; i < 3; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < 3; i++) {
            int total = 0;
            for (int j = 0; j < 3; j++) {
                if (i != j) total += Math.abs(a[i] - a[j]);
            }
            if (total < min) min = total;
        }
        System.out.println(min);
    }
}
