import java.util.*;
import static java.lang.Integer.*;
//import static java.lang.Long.*;
//import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static void main(String[] args) {
		int i;
		Scanner sc = new Scanner(in);
		int[] a = new int[3];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		Arrays.sort(a);
		out.println((a[1]-a[0])+(a[2]-a[1]));
	}
} import java.util.*; util.* java import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static void main(String[] args) {
		int i;
		Scanner sc = new Scanner(in);
		int[] a = new int[3];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		Arrays.sort(a);
		out.println((a[1]-a[0])+(a[2]-a[1]));
	}
} Main public static void main(String[] args) {
		int i;
		Scanner sc = new Scanner(in);
		int[] a = new int[3];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		Arrays.sort(a);
		out.println((a[1]-a[0])+(a[2]-a[1]));
	} main {
		int i;
		Scanner sc = new Scanner(in);
		int[] a = new int[3];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		Arrays.sort(a);
		out.println((a[1]-a[0])+(a[2]-a[1]));
	} int i; i Scanner sc = new Scanner(in); sc new Scanner(in) int[] a = new int[3]; a new int[3] 3 for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		} i = 0; i = 0 i 0 i < a.length i a.length a a.length i++ i++ i {
			a[i] = parseInt(sc.next());
		} {
			a[i] = parseInt(sc.next());
		} a[i] = parseInt(sc.next()) a[i] a i parseInt(sc.next()) parseInt sc.next() sc.next sc sc.close() sc.close sc Arrays.sort(a) Arrays.sort Arrays a out.println((a[1]-a[0])+(a[2]-a[1])) out.println 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) {
		int i;
		Scanner sc = new Scanner(in);
		int[] a = new int[3];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		Arrays.sort(a);
		out.println((a[1]-a[0])+(a[2]-a[1]));
	}
} public class Main {
	public static void main(String[] args) {
		int i;
		Scanner sc = new Scanner(in);
		int[] a = new int[3];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		Arrays.sort(a);
		out.println((a[1]-a[0])+(a[2]-a[1]));
	}
} Main
import java.util.*;
import static java.lang.Integer.*;
//import static java.lang.Long.*;
//import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static void main(String[] args) {
		int i;
		Scanner sc = new Scanner(in);
		int[] a = new int[3];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		Arrays.sort(a);
		out.println((a[1]-a[0])+(a[2]-a[1]));
	}
}
