import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Integer[] A = new Integer[3];
		A[0] = new Integer(sc.nextInt());
		A[1]= new Integer(sc.nextInt());
		A[2]= new Integer(sc.nextInt());
		Arrays.sort(A);
		
		System.out.println((A[1]-A[0])+(A[2]-A[1]));
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Integer[] A = new Integer[3];
		A[0] = new Integer(sc.nextInt());
		A[1]= new Integer(sc.nextInt());
		A[2]= new Integer(sc.nextInt());
		Arrays.sort(A);
		
		System.out.println((A[1]-A[0])+(A[2]-A[1]));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Integer[] A = new Integer[3];
		A[0] = new Integer(sc.nextInt());
		A[1]= new Integer(sc.nextInt());
		A[2]= new Integer(sc.nextInt());
		Arrays.sort(A);
		
		System.out.println((A[1]-A[0])+(A[2]-A[1]));
	} main {
		Scanner sc = new Scanner(System.in);
		Integer[] A = new Integer[3];
		A[0] = new Integer(sc.nextInt());
		A[1]= new Integer(sc.nextInt());
		A[2]= new Integer(sc.nextInt());
		Arrays.sort(A);
		
		System.out.println((A[1]-A[0])+(A[2]-A[1]));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Integer[] A = new Integer[3]; A new Integer[3] 3 A[0] = new Integer(sc.nextInt()) A[0] A 0 new Integer(sc.nextInt()) A[1]= new Integer(sc.nextInt()) A[1] A 1 new Integer(sc.nextInt()) A[2]= new Integer(sc.nextInt()) A[2] A 2 new Integer(sc.nextInt()) Arrays.sort(A) Arrays.sort Arrays A System.out.println((A[1]-A[0])+(A[2]-A[1])) System.out.println System.out System System.out (A[1]-A[0])+(A[2]-A[1]) (A[1]-A[0]) A[1] A 1 A[0] A 0 (A[2]-A[1]) A[2] A 2 A[1] A 1 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Integer[] A = new Integer[3];
		A[0] = new Integer(sc.nextInt());
		A[1]= new Integer(sc.nextInt());
		A[2]= new Integer(sc.nextInt());
		Arrays.sort(A);
		
		System.out.println((A[1]-A[0])+(A[2]-A[1]));
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Integer[] A = new Integer[3];
		A[0] = new Integer(sc.nextInt());
		A[1]= new Integer(sc.nextInt());
		A[2]= new Integer(sc.nextInt());
		Arrays.sort(A);
		
		System.out.println((A[1]-A[0])+(A[2]-A[1]));
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Integer[] A = new Integer[3];
		A[0] = new Integer(sc.nextInt());
		A[1]= new Integer(sc.nextInt());
		A[2]= new Integer(sc.nextInt());
		Arrays.sort(A);
		
		System.out.println((A[1]-A[0])+(A[2]-A[1]));
	}
}
