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

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[] task = new int[3];
		task[0] = sc.nextInt();
		task[1] = sc.nextInt();
		task[2] = sc.nextInt();
		Arrays.sort(task);
		int cost = 0;
		for (int i = 1; i < 3; i++) {
			cost += task[i] - task[i - 1];
		}
		System.out.println(cost);

	}

} 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[] task = new int[3];
		task[0] = sc.nextInt();
		task[1] = sc.nextInt();
		task[2] = sc.nextInt();
		Arrays.sort(task);
		int cost = 0;
		for (int i = 1; i < 3; i++) {
			cost += task[i] - task[i - 1];
		}
		System.out.println(cost);

	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[] task = new int[3];
		task[0] = sc.nextInt();
		task[1] = sc.nextInt();
		task[2] = sc.nextInt();
		Arrays.sort(task);
		int cost = 0;
		for (int i = 1; i < 3; i++) {
			cost += task[i] - task[i - 1];
		}
		System.out.println(cost);

	} main {

		Scanner sc = new Scanner(System.in);
		int[] task = new int[3];
		task[0] = sc.nextInt();
		task[1] = sc.nextInt();
		task[2] = sc.nextInt();
		Arrays.sort(task);
		int cost = 0;
		for (int i = 1; i < 3; i++) {
			cost += task[i] - task[i - 1];
		}
		System.out.println(cost);

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[] task = new int[3];
		task[0] = sc.nextInt();
		task[1] = sc.nextInt();
		task[2] = sc.nextInt();
		Arrays.sort(task);
		int cost = 0;
		for (int i = 1; i < 3; i++) {
			cost += task[i] - task[i - 1];
		}
		System.out.println(cost);

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[] task = new int[3];
		task[0] = sc.nextInt();
		task[1] = sc.nextInt();
		task[2] = sc.nextInt();
		Arrays.sort(task);
		int cost = 0;
		for (int i = 1; i < 3; i++) {
			cost += task[i] - task[i - 1];
		}
		System.out.println(cost);

	}

} 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[] task = new int[3];
		task[0] = sc.nextInt();
		task[1] = sc.nextInt();
		task[2] = sc.nextInt();
		Arrays.sort(task);
		int cost = 0;
		for (int i = 1; i < 3; i++) {
			cost += task[i] - task[i - 1];
		}
		System.out.println(cost);

	}

}
