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

public class Main {

	public static void main(String[] args) {

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

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

		Scanner sc = new Scanner(System.in);
		
		int[] nums = new int[3];
		
		for(int i=0; i<nums.length; i++) {
			nums[i] = sc.nextInt();
		}
		
		Arrays.sort(nums);
		
		int cost = 0;
		
		cost = 0 + Math.abs(nums[1] - nums[0]) + Math.abs(nums[2] - nums[1]);
		System.out.println(cost);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] nums = new int[3]; nums new int[3] 3 for(int i=0; i<nums.length; i++) {
			nums[i] = sc.nextInt();
		} int i=0; int i=0; i 0 i<nums.length i nums.length nums nums.length i++ i++ i {
			nums[i] = sc.nextInt();
		} {
			nums[i] = sc.nextInt();
		} nums[i] = sc.nextInt() nums[i] nums i sc.nextInt() sc.nextInt sc Arrays.sort(nums) Arrays.sort Arrays nums int cost = 0; cost 0 cost = 0 + Math.abs(nums[1] - nums[0]) + Math.abs(nums[2] - nums[1]) cost 0 + Math.abs(nums[1] - nums[0]) + Math.abs(nums[2] - nums[1]) 0 + Math.abs(nums[1] - nums[0]) + Math.abs(nums[2] - nums[1]) 0 Math.abs(nums[1] - nums[0]) Math.abs Math nums[1] - nums[0] nums[1] nums 1 nums[0] nums 0 Math.abs(nums[2] - nums[1]) Math.abs Math nums[2] - nums[1] nums[2] nums 2 nums[1] nums 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[] nums = new int[3];
		
		for(int i=0; i<nums.length; i++) {
			nums[i] = sc.nextInt();
		}
		
		Arrays.sort(nums);
		
		int cost = 0;
		
		cost = 0 + Math.abs(nums[1] - nums[0]) + Math.abs(nums[2] - nums[1]);
		System.out.println(cost);
	}
	
} public class Main {

	public static void main(String[] args) {

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