import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

 class Main 
 {

    public static void main(String[] args) 
    {
        Scanner sc=new Scanner(System.in);
        
        int a[]=new int[3];
        for(int i=0;i<3;i++)
        {
           a[i]=sc.nextInt();
        }
        
        Arrays.sort(a);
        int sum=0;
        for(int i=1;i<=2;i++)
        {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        }
        System.out.println(sum);
    }
} import java.io.*; io.* java import java.math.*; math.* java import java.security.*; security.* java import java.text.*; text.* java import java.util.*; util.* java import java.util.concurrent.*; concurrent.* java.util import java.util.regex.*; regex.* java.util class Main 
 {

    public static void main(String[] args) 
    {
        Scanner sc=new Scanner(System.in);
        
        int a[]=new int[3];
        for(int i=0;i<3;i++)
        {
           a[i]=sc.nextInt();
        }
        
        Arrays.sort(a);
        int sum=0;
        for(int i=1;i<=2;i++)
        {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        }
        System.out.println(sum);
    }
} Main public static void main(String[] args) 
    {
        Scanner sc=new Scanner(System.in);
        
        int a[]=new int[3];
        for(int i=0;i<3;i++)
        {
           a[i]=sc.nextInt();
        }
        
        Arrays.sort(a);
        int sum=0;
        for(int i=1;i<=2;i++)
        {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        }
        System.out.println(sum);
    } main {
        Scanner sc=new Scanner(System.in);
        
        int a[]=new int[3];
        for(int i=0;i<3;i++)
        {
           a[i]=sc.nextInt();
        }
        
        Arrays.sort(a);
        int sum=0;
        for(int i=1;i<=2;i++)
        {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        }
        System.out.println(sum);
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int a[]=new int[3]; a new int[3] 3 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 Arrays.sort(a) Arrays.sort Arrays a int sum=0; sum 0 for(int i=1;i<=2;i++)
        {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        } int i=1; int i=1; i 1 i<=2 i 2 i++ i++ i {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        } {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        } int diff=a[i]-a[i-1]; diff a[i]-a[i-1] a[i] a i a[i-1] a i-1 i 1 sum=sum+diff sum sum+diff sum diff System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

 class Main 
 {

    public static void main(String[] args) 
    {
        Scanner sc=new Scanner(System.in);
        
        int a[]=new int[3];
        for(int i=0;i<3;i++)
        {
           a[i]=sc.nextInt();
        }
        
        Arrays.sort(a);
        int sum=0;
        for(int i=1;i<=2;i++)
        {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        }
        System.out.println(sum);
    }
}