import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a1 , a2 , a3 ;
		a1 = scan.nextInt();
		a2 = scan.nextInt();
		a3 = scan.nextInt();
		int diff1 = Math.abs(a1-a2);
		int diff2 = Math.abs(a2-a3);
		int diff3 = Math.abs(a3-a1);
		int sum1 = diff1+diff2;
		int sum2 = diff2+diff3;
		int sum3 = diff3+diff1;
		int min = sum1;
		if(sum2<min)
			min = sum2;
		if(sum3<min)
			min = sum3;
		System.out.println(min);
		scan.close();
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a1 , a2 , a3 ;
		a1 = scan.nextInt();
		a2 = scan.nextInt();
		a3 = scan.nextInt();
		int diff1 = Math.abs(a1-a2);
		int diff2 = Math.abs(a2-a3);
		int diff3 = Math.abs(a3-a1);
		int sum1 = diff1+diff2;
		int sum2 = diff2+diff3;
		int sum3 = diff3+diff1;
		int min = sum1;
		if(sum2<min)
			min = sum2;
		if(sum3<min)
			min = sum3;
		System.out.println(min);
		scan.close();
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a1 , a2 , a3 ;
		a1 = scan.nextInt();
		a2 = scan.nextInt();
		a3 = scan.nextInt();
		int diff1 = Math.abs(a1-a2);
		int diff2 = Math.abs(a2-a3);
		int diff3 = Math.abs(a3-a1);
		int sum1 = diff1+diff2;
		int sum2 = diff2+diff3;
		int sum3 = diff3+diff1;
		int min = sum1;
		if(sum2<min)
			min = sum2;
		if(sum3<min)
			min = sum3;
		System.out.println(min);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int a1 , a2 , a3 ;
		a1 = scan.nextInt();
		a2 = scan.nextInt();
		a3 = scan.nextInt();
		int diff1 = Math.abs(a1-a2);
		int diff2 = Math.abs(a2-a3);
		int diff3 = Math.abs(a3-a1);
		int sum1 = diff1+diff2;
		int sum2 = diff2+diff3;
		int sum3 = diff3+diff1;
		int min = sum1;
		if(sum2<min)
			min = sum2;
		if(sum3<min)
			min = sum3;
		System.out.println(min);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a1 a1 a2 a2 a3 ; a3 a1 = scan.nextInt() a1 scan.nextInt() scan.nextInt scan a2 = scan.nextInt() a2 scan.nextInt() scan.nextInt scan a3 = scan.nextInt() a3 scan.nextInt() scan.nextInt scan int diff1 = Math.abs(a1-a2); diff1 Math.abs(a1-a2) Math.abs Math a1-a2 a1 a2 int diff2 = Math.abs(a2-a3); diff2 Math.abs(a2-a3) Math.abs Math a2-a3 a2 a3 int diff3 = Math.abs(a3-a1); diff3 Math.abs(a3-a1) Math.abs Math a3-a1 a3 a1 int sum1 = diff1+diff2; sum1 diff1+diff2 diff1 diff2 int sum2 = diff2+diff3; sum2 diff2+diff3 diff2 diff3 int sum3 = diff3+diff1; sum3 diff3+diff1 diff3 diff1 int min = sum1; min sum1 if(sum2<min)
			min = sum2; sum2<min sum2 min min = sum2 min sum2 if(sum3<min)
			min = sum3; sum3<min sum3 min min = sum3 min sum3 System.out.println(min) System.out.println System.out System System.out min scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a1 , a2 , a3 ;
		a1 = scan.nextInt();
		a2 = scan.nextInt();
		a3 = scan.nextInt();
		int diff1 = Math.abs(a1-a2);
		int diff2 = Math.abs(a2-a3);
		int diff3 = Math.abs(a3-a1);
		int sum1 = diff1+diff2;
		int sum2 = diff2+diff3;
		int sum3 = diff3+diff1;
		int min = sum1;
		if(sum2<min)
			min = sum2;
		if(sum3<min)
			min = sum3;
		System.out.println(min);
		scan.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a1 , a2 , a3 ;
		a1 = scan.nextInt();
		a2 = scan.nextInt();
		a3 = scan.nextInt();
		int diff1 = Math.abs(a1-a2);
		int diff2 = Math.abs(a2-a3);
		int diff3 = Math.abs(a3-a1);
		int sum1 = diff1+diff2;
		int sum2 = diff2+diff3;
		int sum3 = diff3+diff1;
		int min = sum1;
		if(sum2<min)
			min = sum2;
		if(sum3<min)
			min = sum3;
		System.out.println(min);
		scan.close();
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a1 , a2 , a3 ;
		a1 = scan.nextInt();
		a2 = scan.nextInt();
		a3 = scan.nextInt();
		int diff1 = Math.abs(a1-a2);
		int diff2 = Math.abs(a2-a3);
		int diff3 = Math.abs(a3-a1);
		int sum1 = diff1+diff2;
		int sum2 = diff2+diff3;
		int sum3 = diff3+diff1;
		int min = sum1;
		if(sum2<min)
			min = sum2;
		if(sum3<min)
			min = sum3;
		System.out.println(min);
		scan.close();
	}

}
