import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();


int r[]=new int[6];

r[0]=ans(a,b,c);
r[1]=ans(a,c,b);
r[2]=ans(b,a,c);
r[3]=ans(b,c,a);
r[4]=ans(c,a,b);
r[5]=ans(c,b,a);

System.out.println(haimin(r));


	}

static int ans(int a,int b,int c){
	int ret=0;
	ret+=Math.abs(b-a);
	ret+=Math.abs(c-b);

	return ret;

}
public static int haimin(int a[]) {
	int d;
	d = a[0];
	for (int i = 0; i <= a.length - 1; i++) {
		if (d >= a[i]) {
			d = a[i];
		}

	}
	return d;
}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();


int r[]=new int[6];

r[0]=ans(a,b,c);
r[1]=ans(a,c,b);
r[2]=ans(b,a,c);
r[3]=ans(b,c,a);
r[4]=ans(c,a,b);
r[5]=ans(c,b,a);

System.out.println(haimin(r));


	}

static int ans(int a,int b,int c){
	int ret=0;
	ret+=Math.abs(b-a);
	ret+=Math.abs(c-b);

	return ret;

}
public static int haimin(int a[]) {
	int d;
	d = a[0];
	for (int i = 0; i <= a.length - 1; i++) {
		if (d >= a[i]) {
			d = a[i];
		}

	}
	return d;
}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();


int r[]=new int[6];

r[0]=ans(a,b,c);
r[1]=ans(a,c,b);
r[2]=ans(b,a,c);
r[3]=ans(b,c,a);
r[4]=ans(c,a,b);
r[5]=ans(c,b,a);

System.out.println(haimin(r));


	} main {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();


int r[]=new int[6];

r[0]=ans(a,b,c);
r[1]=ans(a,c,b);
r[2]=ans(b,a,c);
r[3]=ans(b,c,a);
r[4]=ans(c,a,b);
r[5]=ans(c,b,a);

System.out.println(haimin(r));


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int r[]=new int[6]; r new int[6] 6 r[0]=ans(a,b,c) r[0] r 0 ans(a,b,c) ans a b c r[1]=ans(a,c,b) r[1] r 1 ans(a,c,b) ans a c b r[2]=ans(b,a,c) r[2] r 2 ans(b,a,c) ans b a c r[3]=ans(b,c,a) r[3] r 3 ans(b,c,a) ans b c a r[4]=ans(c,a,b) r[4] r 4 ans(c,a,b) ans c a b r[5]=ans(c,b,a) r[5] r 5 ans(c,b,a) ans c b a System.out.println(haimin(r)) System.out.println System.out System System.out haimin(r) haimin r String[] args args static int ans(int a,int b,int c){
	int ret=0;
	ret+=Math.abs(b-a);
	ret+=Math.abs(c-b);

	return ret;

} ans {
	int ret=0;
	ret+=Math.abs(b-a);
	ret+=Math.abs(c-b);

	return ret;

} int ret=0; ret 0 ret+=Math.abs(b-a) ret Math.abs(b-a) Math.abs Math b-a b a ret+=Math.abs(c-b) ret Math.abs(c-b) Math.abs Math c-b c b return ret; ret int a a int b b int c c public static int haimin(int a[]) {
	int d;
	d = a[0];
	for (int i = 0; i <= a.length - 1; i++) {
		if (d >= a[i]) {
			d = a[i];
		}

	}
	return d;
} haimin {
	int d;
	d = a[0];
	for (int i = 0; i <= a.length - 1; i++) {
		if (d >= a[i]) {
			d = a[i];
		}

	}
	return d;
} int d; d d = a[0] d a[0] a 0 for (int i = 0; i <= a.length - 1; i++) {
		if (d >= a[i]) {
			d = a[i];
		}

	} int i = 0; int i = 0; i 0 i <= a.length - 1 i a.length - 1 a.length a a.length 1 i++ i++ i {
		if (d >= a[i]) {
			d = a[i];
		}

	} {
		if (d >= a[i]) {
			d = a[i];
		}

	} if (d >= a[i]) {
			d = a[i];
		} d >= a[i] d a[i] a i {
			d = a[i];
		} d = a[i] d a[i] a i return d; d int a[] a public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();


int r[]=new int[6];

r[0]=ans(a,b,c);
r[1]=ans(a,c,b);
r[2]=ans(b,a,c);
r[3]=ans(b,c,a);
r[4]=ans(c,a,b);
r[5]=ans(c,b,a);

System.out.println(haimin(r));


	}

static int ans(int a,int b,int c){
	int ret=0;
	ret+=Math.abs(b-a);
	ret+=Math.abs(c-b);

	return ret;

}
public static int haimin(int a[]) {
	int d;
	d = a[0];
	for (int i = 0; i <= a.length - 1; i++) {
		if (d >= a[i]) {
			d = a[i];
		}

	}
	return d;
}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();


int r[]=new int[6];

r[0]=ans(a,b,c);
r[1]=ans(a,c,b);
r[2]=ans(b,a,c);
r[3]=ans(b,c,a);
r[4]=ans(c,a,b);
r[5]=ans(c,b,a);

System.out.println(haimin(r));


	}

static int ans(int a,int b,int c){
	int ret=0;
	ret+=Math.abs(b-a);
	ret+=Math.abs(c-b);

	return ret;

}
public static int haimin(int a[]) {
	int d;
	d = a[0];
	for (int i = 0; i <= a.length - 1; i++) {
		if (d >= a[i]) {
			d = a[i];
		}

	}
	return d;
}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();


int r[]=new int[6];

r[0]=ans(a,b,c);
r[1]=ans(a,c,b);
r[2]=ans(b,a,c);
r[3]=ans(b,c,a);
r[4]=ans(c,a,b);
r[5]=ans(c,b,a);

System.out.println(haimin(r));


	}

static int ans(int a,int b,int c){
	int ret=0;
	ret+=Math.abs(b-a);
	ret+=Math.abs(c-b);

	return ret;

}
public static int haimin(int a[]) {
	int d;
	d = a[0];
	for (int i = 0; i <= a.length - 1; i++) {
		if (d >= a[i]) {
			d = a[i];
		}

	}
	return d;
}

}