import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanNumber = new Scanner(System.in);

        int num1 = Integer.parseInt(scanNumber.next());

        int num2 = Integer.parseInt(scanNumber.next());

        int num3 = Integer.parseInt(scanNumber.next());

        int answer = 0;

        if(num1 < num2){
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        }
        else if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        }

        System.out.print(answer);

    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        Scanner scanNumber = new Scanner(System.in);

        int num1 = Integer.parseInt(scanNumber.next());

        int num2 = Integer.parseInt(scanNumber.next());

        int num3 = Integer.parseInt(scanNumber.next());

        int answer = 0;

        if(num1 < num2){
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        }
        else if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        }

        System.out.print(answer);

    }
} Main public static void main(String[] args) {

        Scanner scanNumber = new Scanner(System.in);

        int num1 = Integer.parseInt(scanNumber.next());

        int num2 = Integer.parseInt(scanNumber.next());

        int num3 = Integer.parseInt(scanNumber.next());

        int answer = 0;

        if(num1 < num2){
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        }
        else if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        }

        System.out.print(answer);

    } main {

        Scanner scanNumber = new Scanner(System.in);

        int num1 = Integer.parseInt(scanNumber.next());

        int num2 = Integer.parseInt(scanNumber.next());

        int num3 = Integer.parseInt(scanNumber.next());

        int answer = 0;

        if(num1 < num2){
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        }
        else if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        }

        System.out.print(answer);

    } Scanner scanNumber = new Scanner(System.in); scanNumber new Scanner(System.in) int num1 = Integer.parseInt(scanNumber.next()); num1 Integer.parseInt(scanNumber.next()) Integer.parseInt Integer scanNumber.next() scanNumber.next scanNumber int num2 = Integer.parseInt(scanNumber.next()); num2 Integer.parseInt(scanNumber.next()) Integer.parseInt Integer scanNumber.next() scanNumber.next scanNumber int num3 = Integer.parseInt(scanNumber.next()); num3 Integer.parseInt(scanNumber.next()) Integer.parseInt Integer scanNumber.next() scanNumber.next scanNumber int answer = 0; answer 0 if(num1 < num2){
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        }
        else if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        } num1 < num2 num1 num2 {
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        } if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            } num2 < num3 num2 num3 {
                answer = num3 - num1;
            } answer = num3 - num1 answer num3 - num1 num3 num1 {
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            } if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                } num1 < num3 num1 num3 {
                    answer = num2 - num1;
                } answer = num2 - num1 answer num2 - num1 num2 num1 {
                    answer = num2 - num3;
                } answer = num2 - num3 answer num2 - num3 num2 num3 if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        } num1 < num3 num1 num3 {
            answer = num3 - num2;
        } answer = num3 - num2 answer num3 - num2 num3 num2 {
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        } if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            } num2 < num3 num2 num3 {
                answer = num1 - num2;
            } answer = num1 - num2 answer num1 - num2 num1 num2 {
                answer = num1 - num3;
            } answer = num1 - num3 answer num1 - num3 num1 num3 System.out.print(answer) System.out.print System.out System System.out answer String[] args args public class Main {

    public static void main(String[] args) {

        Scanner scanNumber = new Scanner(System.in);

        int num1 = Integer.parseInt(scanNumber.next());

        int num2 = Integer.parseInt(scanNumber.next());

        int num3 = Integer.parseInt(scanNumber.next());

        int answer = 0;

        if(num1 < num2){
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        }
        else if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        }

        System.out.print(answer);

    }
} public class Main {

    public static void main(String[] args) {

        Scanner scanNumber = new Scanner(System.in);

        int num1 = Integer.parseInt(scanNumber.next());

        int num2 = Integer.parseInt(scanNumber.next());

        int num3 = Integer.parseInt(scanNumber.next());

        int answer = 0;

        if(num1 < num2){
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        }
        else if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        }

        System.out.print(answer);

    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanNumber = new Scanner(System.in);

        int num1 = Integer.parseInt(scanNumber.next());

        int num2 = Integer.parseInt(scanNumber.next());

        int num3 = Integer.parseInt(scanNumber.next());

        int answer = 0;

        if(num1 < num2){
            if(num2 < num3){
                answer = num3 - num1;
            }
            else{
                if(num1 < num3){
                    answer = num2 - num1;
                }
                else{
                    answer = num2 - num3;
                }
            }
        }
        else if(num1 < num3){
            answer = num3 - num2;
        }
        else{
            if(num2 < num3){
                answer = num1 - num2;
            }
            else{
                answer = num1 - num3;
            }
        }

        System.out.print(answer);

    }
}
