import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        int a = inp.nextInt();
        int b = inp.nextInt();
        int c = inp.nextInt();
        int aa[] = {a, b, c};
        Arrays.sort(aa);
        int ans = 0;
        for (int i = 1; i < 3; i++) {
            ans += (aa[i] - aa[i - 1]);
        }
        System.out.println(ans);
        inp.close();
    }
} import java.util.*; util.* java class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        int a = inp.nextInt();
        int b = inp.nextInt();
        int c = inp.nextInt();
        int aa[] = {a, b, c};
        Arrays.sort(aa);
        int ans = 0;
        for (int i = 1; i < 3; i++) {
            ans += (aa[i] - aa[i - 1]);
        }
        System.out.println(ans);
        inp.close();
    }
} Main public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        int a = inp.nextInt();
        int b = inp.nextInt();
        int c = inp.nextInt();
        int aa[] = {a, b, c};
        Arrays.sort(aa);
        int ans = 0;
        for (int i = 1; i < 3; i++) {
            ans += (aa[i] - aa[i - 1]);
        }
        System.out.println(ans);
        inp.close();
    } main {
        Scanner inp = new Scanner(System.in);
        int a = inp.nextInt();
        int b = inp.nextInt();
        int c = inp.nextInt();
        int aa[] = {a, b, c};
        Arrays.sort(aa);
        int ans = 0;
        for (int i = 1; i < 3; i++) {
            ans += (aa[i] - aa[i - 1]);
        }
        System.out.println(ans);
        inp.close();
    } Scanner inp = new Scanner(System.in); inp new Scanner(System.in) int a = inp.nextInt(); a inp.nextInt() inp.nextInt inp int b = inp.nextInt(); b inp.nextInt() inp.nextInt inp int c = inp.nextInt(); c inp.nextInt() inp.nextInt inp int aa[] = {a, b, c}; aa {a, b, c} a b c Arrays.sort(aa) Arrays.sort Arrays aa int ans = 0; ans 0 for (int i = 1; i < 3; i++) {
            ans += (aa[i] - aa[i - 1]);
        } int i = 1; int i = 1; i 1 i < 3 i 3 i++ i++ i {
            ans += (aa[i] - aa[i - 1]);
        } {
            ans += (aa[i] - aa[i - 1]);
        } ans += (aa[i] - aa[i - 1]) ans (aa[i] - aa[i - 1]) aa[i] aa i aa[i - 1] aa i - 1 i 1 System.out.println(ans) System.out.println System.out System System.out ans inp.close() inp.close inp String args[] args
import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        int a = inp.nextInt();
        int b = inp.nextInt();
        int c = inp.nextInt();
        int aa[] = {a, b, c};
        Arrays.sort(aa);
        int ans = 0;
        for (int i = 1; i < 3; i++) {
            ans += (aa[i] - aa[i - 1]);
        }
        System.out.println(ans);
        inp.close();
    }
}
