import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String[] temp = scanner.nextLine().split(" ");
		int[] list = new int[temp.length];
		for(int i = 0; i < 3; i++) {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		}

		int ans = 0;
		if(list[2] > list[1]) {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		}else {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		}

		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String[] temp = scanner.nextLine().split(" ");
		int[] list = new int[temp.length];
		for(int i = 0; i < 3; i++) {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		}

		int ans = 0;
		if(list[2] > list[1]) {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		}else {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		}

		System.out.println(ans);
	}
} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String[] temp = scanner.nextLine().split(" ");
		int[] list = new int[temp.length];
		for(int i = 0; i < 3; i++) {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		}

		int ans = 0;
		if(list[2] > list[1]) {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		}else {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		}

		System.out.println(ans);
	} main {

		Scanner scanner = new Scanner(System.in);
		String[] temp = scanner.nextLine().split(" ");
		int[] list = new int[temp.length];
		for(int i = 0; i < 3; i++) {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		}

		int ans = 0;
		if(list[2] > list[1]) {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		}else {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		}

		System.out.println(ans);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] temp = scanner.nextLine().split(" "); temp scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " int[] list = new int[temp.length]; list new int[temp.length] temp.length temp temp.length for(int i = 0; i < 3; i++) {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		} {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		} list[i] = Integer.parseInt(temp[i]) list[i] list i Integer.parseInt(temp[i]) Integer.parseInt Integer temp[i] temp i if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			} list[0] > list[i] list[0] list 0 list[i] list i {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			} int te = list[0]; te list[0] list 0 list[0] = list[i] list[0] list 0 list[i] list i list[i] = te list[i] list i te int ans = 0; ans 0 if(list[2] > list[1]) {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		}else {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		} list[2] > list[1] list[2] list 2 list[1] list 1 {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		} ans = (list[1] - list[0]) + (list[2] - list[1]) ans (list[1] - list[0]) + (list[2] - list[1]) (list[1] - list[0]) list[1] list 1 list[0] list 0 (list[2] - list[1]) list[2] list 2 list[1] list 1 {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		} ans = (list[2] - list[0]) + (list[1] - list[2]) ans (list[2] - list[0]) + (list[1] - list[2]) (list[2] - list[0]) list[2] list 2 list[0] list 0 (list[1] - list[2]) list[1] list 1 list[2] list 2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String[] temp = scanner.nextLine().split(" ");
		int[] list = new int[temp.length];
		for(int i = 0; i < 3; i++) {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		}

		int ans = 0;
		if(list[2] > list[1]) {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		}else {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		}

		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String[] temp = scanner.nextLine().split(" ");
		int[] list = new int[temp.length];
		for(int i = 0; i < 3; i++) {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		}

		int ans = 0;
		if(list[2] > list[1]) {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		}else {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		}

		System.out.println(ans);
	}
} Main
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String[] temp = scanner.nextLine().split(" ");
		int[] list = new int[temp.length];
		for(int i = 0; i < 3; i++) {
			list[i] = Integer.parseInt(temp[i]);
			if(list[0] > list[i]) {
				int te = list[0];
				list[0] = list[i];
				list[i] = te;
			}
		}

		int ans = 0;
		if(list[2] > list[1]) {
			ans = (list[1] - list[0]) + (list[2] - list[1]);
		}else {
			ans = (list[2] - list[0]) + (list[1] - list[2]);
		}

		System.out.println(ans);
	}
}
