import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main{
    public static void main(String []args)
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b =sc.nextInt();
        int c =sc.nextInt();
        int x3=Math.abs(a-b);
        int x1= Math.abs(a-c);
        int x2= Math.abs(b-c);
        int total=x1+x2+x3;
        total = Math.abs(total-(Math.max(x3,Math.max(x2,x1))));
        System.out.println(total);

    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String []args)
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b =sc.nextInt();
        int c =sc.nextInt();
        int x3=Math.abs(a-b);
        int x1= Math.abs(a-c);
        int x2= Math.abs(b-c);
        int total=x1+x2+x3;
        total = Math.abs(total-(Math.max(x3,Math.max(x2,x1))));
        System.out.println(total);

    }
} Main public static void main(String []args)
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b =sc.nextInt();
        int c =sc.nextInt();
        int x3=Math.abs(a-b);
        int x1= Math.abs(a-c);
        int x2= Math.abs(b-c);
        int total=x1+x2+x3;
        total = Math.abs(total-(Math.max(x3,Math.max(x2,x1))));
        System.out.println(total);

    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b =sc.nextInt();
        int c =sc.nextInt();
        int x3=Math.abs(a-b);
        int x1= Math.abs(a-c);
        int x2= Math.abs(b-c);
        int total=x1+x2+x3;
        total = Math.abs(total-(Math.max(x3,Math.max(x2,x1))));
        System.out.println(total);

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 x3=Math.abs(a-b); x3 Math.abs(a-b) Math.abs Math a-b a b int x1= Math.abs(a-c); x1 Math.abs(a-c) Math.abs Math a-c a c int x2= Math.abs(b-c); x2 Math.abs(b-c) Math.abs Math b-c b c int total=x1+x2+x3; total x1+x2+x3 x1+x2+x3 x1 x2 x3 total = Math.abs(total-(Math.max(x3,Math.max(x2,x1)))) total Math.abs(total-(Math.max(x3,Math.max(x2,x1)))) Math.abs Math total-(Math.max(x3,Math.max(x2,x1))) total (Math.max(x3,Math.max(x2,x1))) Math.max Math x3 Math.max(x2,x1) Math.max Math x2 x1 System.out.println(total) System.out.println System.out System System.out total String []args args public class Main{
    public static void main(String []args)
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b =sc.nextInt();
        int c =sc.nextInt();
        int x3=Math.abs(a-b);
        int x1= Math.abs(a-c);
        int x2= Math.abs(b-c);
        int total=x1+x2+x3;
        total = Math.abs(total-(Math.max(x3,Math.max(x2,x1))));
        System.out.println(total);

    }
} public class Main{
    public static void main(String []args)
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b =sc.nextInt();
        int c =sc.nextInt();
        int x3=Math.abs(a-b);
        int x1= Math.abs(a-c);
        int x2= Math.abs(b-c);
        int total=x1+x2+x3;
        total = Math.abs(total-(Math.max(x3,Math.max(x2,x1))));
        System.out.println(total);

    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main{
    public static void main(String []args)
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b =sc.nextInt();
        int c =sc.nextInt();
        int x3=Math.abs(a-b);
        int x1= Math.abs(a-c);
        int x2= Math.abs(b-c);
        int total=x1+x2+x3;
        total = Math.abs(total-(Math.max(x3,Math.max(x2,x1))));
        System.out.println(total);

    }
}