import java.util.*;

public class Main {

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] numbers = new int[3];
		int task = 0;
		for(int a = 0 ; a < 3 ; a++){
			numbers[a] = sc.nextInt();
		}
		sc.close();
		Arrays.sort(numbers);
		task = Math.abs(numbers[0] - numbers[1]) + Math.abs(numbers[1] - numbers[2]);
		System.out.println(task);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] numbers = new int[3];
		int task = 0;
		for(int a = 0 ; a < 3 ; a++){
			numbers[a] = sc.nextInt();
		}
		sc.close();
		Arrays.sort(numbers);
		task = Math.abs(numbers[0] - numbers[1]) + Math.abs(numbers[1] - numbers[2]);
		System.out.println(task);
	} main {
		Scanner sc = new Scanner(System.in);
		int[] numbers = new int[3];
		int task = 0;
		for(int a = 0 ; a < 3 ; a++){
			numbers[a] = sc.nextInt();
		}
		sc.close();
		Arrays.sort(numbers);
		task = Math.abs(numbers[0] - numbers[1]) + Math.abs(numbers[1] - numbers[2]);
		System.out.println(task);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] numbers = new int[3]; numbers new int[3] 3 int task = 0; task 0 for(int a = 0 ; a < 3 ; a++){
			numbers[a] = sc.nextInt();
		} int a = 0 ; int a = 0 ; a 0 a < 3 a 3 a++ a++ a {
			numbers[a] = sc.nextInt();
		} {
			numbers[a] = sc.nextInt();
		} numbers[a] = sc.nextInt() numbers[a] numbers a sc.nextInt() sc.nextInt sc sc.close() sc.close sc Arrays.sort(numbers) Arrays.sort Arrays numbers task = Math.abs(numbers[0] - numbers[1]) + Math.abs(numbers[1] - numbers[2]) task Math.abs(numbers[0] - numbers[1]) + Math.abs(numbers[1] - numbers[2]) Math.abs(numbers[0] - numbers[1]) Math.abs Math numbers[0] - numbers[1] numbers[0] numbers 0 numbers[1] numbers 1 Math.abs(numbers[1] - numbers[2]) Math.abs Math numbers[1] - numbers[2] numbers[1] numbers 1 numbers[2] numbers 2 System.out.println(task) System.out.println System.out System System.out task String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] numbers = new int[3];
		int task = 0;
		for(int a = 0 ; a < 3 ; a++){
			numbers[a] = sc.nextInt();
		}
		sc.close();
		Arrays.sort(numbers);
		task = Math.abs(numbers[0] - numbers[1]) + Math.abs(numbers[1] - numbers[2]);
		System.out.println(task);
	}
} public class Main {

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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] numbers = new int[3];
		int task = 0;
		for(int a = 0 ; a < 3 ; a++){
			numbers[a] = sc.nextInt();
		}
		sc.close();
		Arrays.sort(numbers);
		task = Math.abs(numbers[0] - numbers[1]) + Math.abs(numbers[1] - numbers[2]);
		System.out.println(task);
	}
}