import java.util.*;
public class Main {
	public static void main(String[] args){
		taskScheduling();
	}
	
	public static void taskScheduling() {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
		a[0] =  sc.nextInt();
		a[1] =  sc.nextInt();
		a[2] =  sc.nextInt();
		Arrays.sort(a);
		int res = 0;
		for (int i=1; i<a.length; i++) {
			res += a[i]-a[i-1];
		}
		System.out.println(res);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		taskScheduling();
	}
	
	public static void taskScheduling() {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
		a[0] =  sc.nextInt();
		a[1] =  sc.nextInt();
		a[2] =  sc.nextInt();
		Arrays.sort(a);
		int res = 0;
		for (int i=1; i<a.length; i++) {
			res += a[i]-a[i-1];
		}
		System.out.println(res);
	}
} Main public static void main(String[] args){
		taskScheduling();
	} main {
		taskScheduling();
	} taskScheduling() taskScheduling String[] args args public static void taskScheduling() {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
		a[0] =  sc.nextInt();
		a[1] =  sc.nextInt();
		a[2] =  sc.nextInt();
		Arrays.sort(a);
		int res = 0;
		for (int i=1; i<a.length; i++) {
			res += a[i]-a[i-1];
		}
		System.out.println(res);
	} taskScheduling {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
		a[0] =  sc.nextInt();
		a[1] =  sc.nextInt();
		a[2] =  sc.nextInt();
		Arrays.sort(a);
		int res = 0;
		for (int i=1; i<a.length; i++) {
			res += a[i]-a[i-1];
		}
		System.out.println(res);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] a = new int[3]; a new int[3] 3 a[0] =  sc.nextInt() a[0] a 0 sc.nextInt() sc.nextInt sc a[1] =  sc.nextInt() a[1] a 1 sc.nextInt() sc.nextInt sc a[2] =  sc.nextInt() a[2] a 2 sc.nextInt() sc.nextInt sc Arrays.sort(a) Arrays.sort Arrays a int res = 0; res 0 for (int i=1; i<a.length; i++) {
			res += a[i]-a[i-1];
		} int i=1; int i=1; i 1 i<a.length i a.length a a.length i++ i++ i {
			res += a[i]-a[i-1];
		} {
			res += a[i]-a[i-1];
		} res += a[i]-a[i-1] res a[i]-a[i-1] a[i] a i a[i-1] a i-1 i 1 System.out.println(res) System.out.println System.out System System.out res public class Main {
	public static void main(String[] args){
		taskScheduling();
	}
	
	public static void taskScheduling() {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
		a[0] =  sc.nextInt();
		a[1] =  sc.nextInt();
		a[2] =  sc.nextInt();
		Arrays.sort(a);
		int res = 0;
		for (int i=1; i<a.length; i++) {
			res += a[i]-a[i-1];
		}
		System.out.println(res);
	}
} public class Main {
	public static void main(String[] args){
		taskScheduling();
	}
	
	public static void taskScheduling() {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
		a[0] =  sc.nextInt();
		a[1] =  sc.nextInt();
		a[2] =  sc.nextInt();
		Arrays.sort(a);
		int res = 0;
		for (int i=1; i<a.length; i++) {
			res += a[i]-a[i-1];
		}
		System.out.println(res);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		taskScheduling();
	}
	
	public static void taskScheduling() {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
		a[0] =  sc.nextInt();
		a[1] =  sc.nextInt();
		a[2] =  sc.nextInt();
		Arrays.sort(a);
		int res = 0;
		for (int i=1; i<a.length; i++) {
			res += a[i]-a[i-1];
		}
		System.out.println(res);
	}
}