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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s = sc.next();
		//String t = sc.next();
		//String g = sc.next();
		long n = sc.nextLong();
		long m = sc.nextLong();
		long k = sc.nextLong();
		//long l = sc.nextLong();
		long count=0;
		long[] array=new long[3];
		array[0] = n;
		array[1] = m;
		array[2] = k;

		/*for(int i=0;i<=3;i++) {
			if(s.substring(i,i+1).equals("+")) {
				count++;
			}else {
				count--;
			}
		}*/
		Arrays.sort(array);
		/*if() {
			System.out.println(n);
		}else{
			System.out.println(n*2);
		}*/
		//System.out.println((int)Math.ceil((n+m)/2.0));
		System.out.println(Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0]));
	}
}

 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);
		//String s = sc.next();
		//String t = sc.next();
		//String g = sc.next();
		long n = sc.nextLong();
		long m = sc.nextLong();
		long k = sc.nextLong();
		//long l = sc.nextLong();
		long count=0;
		long[] array=new long[3];
		array[0] = n;
		array[1] = m;
		array[2] = k;

		/*for(int i=0;i<=3;i++) {
			if(s.substring(i,i+1).equals("+")) {
				count++;
			}else {
				count--;
			}
		}*/
		Arrays.sort(array);
		/*if() {
			System.out.println(n);
		}else{
			System.out.println(n*2);
		}*/
		//System.out.println((int)Math.ceil((n+m)/2.0));
		System.out.println(Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0]));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s = sc.next();
		//String t = sc.next();
		//String g = sc.next();
		long n = sc.nextLong();
		long m = sc.nextLong();
		long k = sc.nextLong();
		//long l = sc.nextLong();
		long count=0;
		long[] array=new long[3];
		array[0] = n;
		array[1] = m;
		array[2] = k;

		/*for(int i=0;i<=3;i++) {
			if(s.substring(i,i+1).equals("+")) {
				count++;
			}else {
				count--;
			}
		}*/
		Arrays.sort(array);
		/*if() {
			System.out.println(n);
		}else{
			System.out.println(n*2);
		}*/
		//System.out.println((int)Math.ceil((n+m)/2.0));
		System.out.println(Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0]));
	} main {
		Scanner sc = new Scanner(System.in);
		//String s = sc.next();
		//String t = sc.next();
		//String g = sc.next();
		long n = sc.nextLong();
		long m = sc.nextLong();
		long k = sc.nextLong();
		//long l = sc.nextLong();
		long count=0;
		long[] array=new long[3];
		array[0] = n;
		array[1] = m;
		array[2] = k;

		/*for(int i=0;i<=3;i++) {
			if(s.substring(i,i+1).equals("+")) {
				count++;
			}else {
				count--;
			}
		}*/
		Arrays.sort(array);
		/*if() {
			System.out.println(n);
		}else{
			System.out.println(n*2);
		}*/
		//System.out.println((int)Math.ceil((n+m)/2.0));
		System.out.println(Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0]));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long m = sc.nextLong(); m sc.nextLong() sc.nextLong sc long k = sc.nextLong(); k sc.nextLong() sc.nextLong sc long count=0; count 0 long[] array=new long[3]; array new long[3] 3 array[0] = n array[0] array 0 n array[1] = m array[1] array 1 m array[2] = k array[2] array 2 k Arrays.sort(array) Arrays.sort Arrays array System.out.println(Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0])) System.out.println System.out System System.out Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0]) Math.abs(array[2]-array[1]) Math.abs Math array[2]-array[1] array[2] array 2 array[1] array 1 Math.abs(array[1]-array[0]) Math.abs Math array[1]-array[0] array[1] array 1 array[0] array 0 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s = sc.next();
		//String t = sc.next();
		//String g = sc.next();
		long n = sc.nextLong();
		long m = sc.nextLong();
		long k = sc.nextLong();
		//long l = sc.nextLong();
		long count=0;
		long[] array=new long[3];
		array[0] = n;
		array[1] = m;
		array[2] = k;

		/*for(int i=0;i<=3;i++) {
			if(s.substring(i,i+1).equals("+")) {
				count++;
			}else {
				count--;
			}
		}*/
		Arrays.sort(array);
		/*if() {
			System.out.println(n);
		}else{
			System.out.println(n*2);
		}*/
		//System.out.println((int)Math.ceil((n+m)/2.0));
		System.out.println(Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0]));
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s = sc.next();
		//String t = sc.next();
		//String g = sc.next();
		long n = sc.nextLong();
		long m = sc.nextLong();
		long k = sc.nextLong();
		//long l = sc.nextLong();
		long count=0;
		long[] array=new long[3];
		array[0] = n;
		array[1] = m;
		array[2] = k;

		/*for(int i=0;i<=3;i++) {
			if(s.substring(i,i+1).equals("+")) {
				count++;
			}else {
				count--;
			}
		}*/
		Arrays.sort(array);
		/*if() {
			System.out.println(n);
		}else{
			System.out.println(n*2);
		}*/
		//System.out.println((int)Math.ceil((n+m)/2.0));
		System.out.println(Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0]));
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s = sc.next();
		//String t = sc.next();
		//String g = sc.next();
		long n = sc.nextLong();
		long m = sc.nextLong();
		long k = sc.nextLong();
		//long l = sc.nextLong();
		long count=0;
		long[] array=new long[3];
		array[0] = n;
		array[1] = m;
		array[2] = k;

		/*for(int i=0;i<=3;i++) {
			if(s.substring(i,i+1).equals("+")) {
				count++;
			}else {
				count--;
			}
		}*/
		Arrays.sort(array);
		/*if() {
			System.out.println(n);
		}else{
			System.out.println(n*2);
		}*/
		//System.out.println((int)Math.ceil((n+m)/2.0));
		System.out.println(Math.abs(array[2]-array[1])+Math.abs(array[1]-array[0]));
	}
}


