    import java.util.*;
    public class Main {
     
    	public static void main(String[] args) {
    			
    		Scanner scan =new Scanner(System.in);
    		
    		int a1=Integer.parseInt(scan.next());
    		int a2=Integer.parseInt(scan.next());
    		int a3=Integer.parseInt(scan.next());
    		
    		int[] a= {a1,a2,a3};
    		Arrays.parallelSort(a);
    		
    		System.out.print(a[1]-a[0]+a[2]-a[1]);
     
    }
    }
// end  import java.util.*; util.* java public class Main {
     
    	public static void main(String[] args) {
    			
    		Scanner scan =new Scanner(System.in);
    		
    		int a1=Integer.parseInt(scan.next());
    		int a2=Integer.parseInt(scan.next());
    		int a3=Integer.parseInt(scan.next());
    		
    		int[] a= {a1,a2,a3};
    		Arrays.parallelSort(a);
    		
    		System.out.print(a[1]-a[0]+a[2]-a[1]);
     
    }
    } Main public static void main(String[] args) {
    			
    		Scanner scan =new Scanner(System.in);
    		
    		int a1=Integer.parseInt(scan.next());
    		int a2=Integer.parseInt(scan.next());
    		int a3=Integer.parseInt(scan.next());
    		
    		int[] a= {a1,a2,a3};
    		Arrays.parallelSort(a);
    		
    		System.out.print(a[1]-a[0]+a[2]-a[1]);
     
    } main {
    			
    		Scanner scan =new Scanner(System.in);
    		
    		int a1=Integer.parseInt(scan.next());
    		int a2=Integer.parseInt(scan.next());
    		int a3=Integer.parseInt(scan.next());
    		
    		int[] a= {a1,a2,a3};
    		Arrays.parallelSort(a);
    		
    		System.out.print(a[1]-a[0]+a[2]-a[1]);
     
    } Scanner scan =new Scanner(System.in); scan new Scanner(System.in) int a1=Integer.parseInt(scan.next()); a1 Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int a2=Integer.parseInt(scan.next()); a2 Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int a3=Integer.parseInt(scan.next()); a3 Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int[] a= {a1,a2,a3}; a {a1,a2,a3} a1 a2 a3 Arrays.parallelSort(a) Arrays.parallelSort Arrays a System.out.print(a[1]-a[0]+a[2]-a[1]) System.out.print System.out System System.out a[1]-a[0]+a[2]-a[1] a[1]-a[0]+a[2] a[1]-a[0] a[1] a 1 a[0] a 0 a[2] a 2 a[1] a 1 String[] args args public class Main {
     
    	public static void main(String[] args) {
    			
    		Scanner scan =new Scanner(System.in);
    		
    		int a1=Integer.parseInt(scan.next());
    		int a2=Integer.parseInt(scan.next());
    		int a3=Integer.parseInt(scan.next());
    		
    		int[] a= {a1,a2,a3};
    		Arrays.parallelSort(a);
    		
    		System.out.print(a[1]-a[0]+a[2]-a[1]);
     
    }
    } public class Main {
     
    	public static void main(String[] args) {
    			
    		Scanner scan =new Scanner(System.in);
    		
    		int a1=Integer.parseInt(scan.next());
    		int a2=Integer.parseInt(scan.next());
    		int a3=Integer.parseInt(scan.next());
    		
    		int[] a= {a1,a2,a3};
    		Arrays.parallelSort(a);
    		
    		System.out.print(a[1]-a[0]+a[2]-a[1]);
     
    }
    } Main
    import java.util.*;
    public class Main {
     
    	public static void main(String[] args) {
    			
    		Scanner scan =new Scanner(System.in);
    		
    		int a1=Integer.parseInt(scan.next());
    		int a2=Integer.parseInt(scan.next());
    		int a3=Integer.parseInt(scan.next());
    		
    		int[] a= {a1,a2,a3};
    		Arrays.parallelSort(a);
    		
    		System.out.print(a[1]-a[0]+a[2]-a[1]);
     
    }
    }
// end 