
import java.util.*;
class Main {

	
	
		public static void main(String[] args) {
			Scanner Cf=new Scanner(System.in);
				
				int[] A=new int[3];
				 A[0]=Cf.nextInt();
				 A[1]=Cf.nextInt();
				 A[2]=Cf.nextInt();
				
				
				
				Solver(A);
				Cf.close();
			}
		
		
		public static void Solver(int[] A) {
		
			Arrays.sort(A);
			int diff=0;
			for(int i=1;i<A.length;i++) {
				diff=Math.abs(A[i]-A[i-1])+diff;
			}
			System.out.println(diff);
		}
	

	} import java.util.*; util.* java class Main {

	
	
		public static void main(String[] args) {
			Scanner Cf=new Scanner(System.in);
				
				int[] A=new int[3];
				 A[0]=Cf.nextInt();
				 A[1]=Cf.nextInt();
				 A[2]=Cf.nextInt();
				
				
				
				Solver(A);
				Cf.close();
			}
		
		
		public static void Solver(int[] A) {
		
			Arrays.sort(A);
			int diff=0;
			for(int i=1;i<A.length;i++) {
				diff=Math.abs(A[i]-A[i-1])+diff;
			}
			System.out.println(diff);
		}
	

	} Main public static void main(String[] args) {
			Scanner Cf=new Scanner(System.in);
				
				int[] A=new int[3];
				 A[0]=Cf.nextInt();
				 A[1]=Cf.nextInt();
				 A[2]=Cf.nextInt();
				
				
				
				Solver(A);
				Cf.close();
			} main {
			Scanner Cf=new Scanner(System.in);
				
				int[] A=new int[3];
				 A[0]=Cf.nextInt();
				 A[1]=Cf.nextInt();
				 A[2]=Cf.nextInt();
				
				
				
				Solver(A);
				Cf.close();
			} Scanner Cf=new Scanner(System.in); Cf new Scanner(System.in) int[] A=new int[3]; A new int[3] 3 A[0]=Cf.nextInt() A[0] A 0 Cf.nextInt() Cf.nextInt Cf A[1]=Cf.nextInt() A[1] A 1 Cf.nextInt() Cf.nextInt Cf A[2]=Cf.nextInt() A[2] A 2 Cf.nextInt() Cf.nextInt Cf Solver(A) Solver A Cf.close() Cf.close Cf String[] args args public static void Solver(int[] A) {
		
			Arrays.sort(A);
			int diff=0;
			for(int i=1;i<A.length;i++) {
				diff=Math.abs(A[i]-A[i-1])+diff;
			}
			System.out.println(diff);
		} Solver {
		
			Arrays.sort(A);
			int diff=0;
			for(int i=1;i<A.length;i++) {
				diff=Math.abs(A[i]-A[i-1])+diff;
			}
			System.out.println(diff);
		} Arrays.sort(A) Arrays.sort Arrays A int diff=0; diff 0 for(int i=1;i<A.length;i++) {
				diff=Math.abs(A[i]-A[i-1])+diff;
			} int i=1; int i=1; i 1 i<A.length i A.length A A.length i++ i++ i {
				diff=Math.abs(A[i]-A[i-1])+diff;
			} {
				diff=Math.abs(A[i]-A[i-1])+diff;
			} diff=Math.abs(A[i]-A[i-1])+diff diff Math.abs(A[i]-A[i-1])+diff Math.abs(A[i]-A[i-1]) Math.abs Math A[i]-A[i-1] A[i] A i A[i-1] A i-1 i 1 diff System.out.println(diff) System.out.println System.out System System.out diff int[] A A

import java.util.*;
class Main {

	
	
		public static void main(String[] args) {
			Scanner Cf=new Scanner(System.in);
				
				int[] A=new int[3];
				 A[0]=Cf.nextInt();
				 A[1]=Cf.nextInt();
				 A[2]=Cf.nextInt();
				
				
				
				Solver(A);
				Cf.close();
			}
		
		
		public static void Solver(int[] A) {
		
			Arrays.sort(A);
			int diff=0;
			for(int i=1;i<A.length;i++) {
				diff=Math.abs(A[i]-A[i-1])+diff;
			}
			System.out.println(diff);
		}
	

	}
