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