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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] li = new int[3];
		li[0] = sc.nextInt();
		li[1] = sc.nextInt();
		li[2] = sc.nextInt();
		Arrays.sort(li);
		int i = (li[2] - li[1]) + (li[1] - li[0]);
		System.out.println(i);
	}
} 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);
		int[] li = new int[3];
		li[0] = sc.nextInt();
		li[1] = sc.nextInt();
		li[2] = sc.nextInt();
		Arrays.sort(li);
		int i = (li[2] - li[1]) + (li[1] - li[0]);
		System.out.println(i);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] li = new int[3];
		li[0] = sc.nextInt();
		li[1] = sc.nextInt();
		li[2] = sc.nextInt();
		Arrays.sort(li);
		int i = (li[2] - li[1]) + (li[1] - li[0]);
		System.out.println(i);
	} main {
		Scanner sc = new Scanner(System.in);
		int[] li = new int[3];
		li[0] = sc.nextInt();
		li[1] = sc.nextInt();
		li[2] = sc.nextInt();
		Arrays.sort(li);
		int i = (li[2] - li[1]) + (li[1] - li[0]);
		System.out.println(i);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] li = new int[3]; li new int[3] 3 li[0] = sc.nextInt() li[0] li 0 sc.nextInt() sc.nextInt sc li[1] = sc.nextInt() li[1] li 1 sc.nextInt() sc.nextInt sc li[2] = sc.nextInt() li[2] li 2 sc.nextInt() sc.nextInt sc Arrays.sort(li) Arrays.sort Arrays li int i = (li[2] - li[1]) + (li[1] - li[0]); i (li[2] - li[1]) + (li[1] - li[0]) (li[2] - li[1]) li[2] li 2 li[1] li 1 (li[1] - li[0]) li[1] li 1 li[0] li 0 System.out.println(i) System.out.println System.out System System.out i String[] args args public class Main {

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

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

public class Main {

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