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

public class Main {

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

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

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

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

} public class Main {

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

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

}