import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int ab = Math.abs(a - b);
        int bc = Math.abs(b - c);
        int ca = Math.abs(c - a);
        int min = Math.min(a, b);
        min = Math.min(min, c);
        int max = Math.max(a, b);
        max = Math.max(max, c);

        if (min == a && max == b || min == b && max == a) {
            System.out.println(ca + bc);
        } else if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int ab = Math.abs(a - b);
        int bc = Math.abs(b - c);
        int ca = Math.abs(c - a);
        int min = Math.min(a, b);
        min = Math.min(min, c);
        int max = Math.max(a, b);
        max = Math.max(max, c);

        if (min == a && max == b || min == b && max == a) {
            System.out.println(ca + bc);
        } else if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    } main {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    } try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        } {
            solve(sc);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) solve(sc) solve sc String[] args args public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int ab = Math.abs(a - b);
        int bc = Math.abs(b - c);
        int ca = Math.abs(c - a);
        int min = Math.min(a, b);
        min = Math.min(min, c);
        int max = Math.max(a, b);
        max = Math.max(max, c);

        if (min == a && max == b || min == b && max == a) {
            System.out.println(ca + bc);
        } else if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        }
    } solve {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int ab = Math.abs(a - b);
        int bc = Math.abs(b - c);
        int ca = Math.abs(c - a);
        int min = Math.min(a, b);
        min = Math.min(min, c);
        int max = Math.max(a, b);
        max = Math.max(max, c);

        if (min == a && max == b || min == b && max == a) {
            System.out.println(ca + bc);
        } else if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        }
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int ab = Math.abs(a - b); ab Math.abs(a - b) Math.abs Math a - b a b int bc = Math.abs(b - c); bc Math.abs(b - c) Math.abs Math b - c b c int ca = Math.abs(c - a); ca Math.abs(c - a) Math.abs Math c - a c a int min = Math.min(a, b); min Math.min(a, b) Math.min Math a b min = Math.min(min, c) min Math.min(min, c) Math.min Math min c int max = Math.max(a, b); max Math.max(a, b) Math.max Math a b max = Math.max(max, c) max Math.max(max, c) Math.max Math max c if (min == a && max == b || min == b && max == a) {
            System.out.println(ca + bc);
        } else if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        } min == a && max == b || min == b && max == a min == a && max == b min == a min a max == b max b min == b && max == a min == b min b max == a max a {
            System.out.println(ca + bc);
        } System.out.println(ca + bc) System.out.println System.out System System.out ca + bc ca bc if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        } min == b && max == c || min == c && max == b min == b && max == c min == b min b max == c max c min == c && max == b min == c min c max == b max b {
            System.out.println(ab + ca);
        } System.out.println(ab + ca) System.out.println System.out System System.out ab + ca ab ca if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        } min == c && max == a || min == a && max == c min == c && max == a min == c min c max == a max a min == a && max == c min == a min a max == c max c {
            System.out.println(bc + ab);
        } System.out.println(bc + ab) System.out.println System.out System System.out bc + ab bc ab Scanner sc sc public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int ab = Math.abs(a - b);
        int bc = Math.abs(b - c);
        int ca = Math.abs(c - a);
        int min = Math.min(a, b);
        min = Math.min(min, c);
        int max = Math.max(a, b);
        max = Math.max(max, c);

        if (min == a && max == b || min == b && max == a) {
            System.out.println(ca + bc);
        } else if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int ab = Math.abs(a - b);
        int bc = Math.abs(b - c);
        int ca = Math.abs(c - a);
        int min = Math.min(a, b);
        min = Math.min(min, c);
        int max = Math.max(a, b);
        max = Math.max(max, c);

        if (min == a && max == b || min == b && max == a) {
            System.out.println(ca + bc);
        } else if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int ab = Math.abs(a - b);
        int bc = Math.abs(b - c);
        int ca = Math.abs(c - a);
        int min = Math.min(a, b);
        min = Math.min(min, c);
        int max = Math.max(a, b);
        max = Math.max(max, c);

        if (min == a && max == b || min == b && max == a) {
            System.out.println(ca + bc);
        } else if (min == b && max == c || min == c && max == b) {
            System.out.println(ab + ca);
        } else if (min == c && max == a || min == a && max == c) {
            System.out.println(bc + ab);
        }
    }
}