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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] task= new int[3];
		int ans=0;


		for(int i=0; i<3; i++) {
			task[i]=sc.nextInt();
		}

		Arrays.sort(task);

		for(int i=0; i<2; i++) {
			ans+=Math.abs(task[i]-task[i+1]);
		}
		System.out.println(ans);
	}
} 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[] task= new int[3];
		int ans=0;


		for(int i=0; i<3; i++) {
			task[i]=sc.nextInt();
		}

		Arrays.sort(task);

		for(int i=0; i<2; i++) {
			ans+=Math.abs(task[i]-task[i+1]);
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] task= new int[3];
		int ans=0;


		for(int i=0; i<3; i++) {
			task[i]=sc.nextInt();
		}

		Arrays.sort(task);

		for(int i=0; i<2; i++) {
			ans+=Math.abs(task[i]-task[i+1]);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int[] task= new int[3];
		int ans=0;


		for(int i=0; i<3; i++) {
			task[i]=sc.nextInt();
		}

		Arrays.sort(task);

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


		for(int i=0; i<3; i++) {
			task[i]=sc.nextInt();
		}

		Arrays.sort(task);

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


		for(int i=0; i<3; i++) {
			task[i]=sc.nextInt();
		}

		Arrays.sort(task);

		for(int i=0; i<2; i++) {
			ans+=Math.abs(task[i]-task[i+1]);
		}
		System.out.println(ans);
	}
} 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[] task= new int[3];
		int ans=0;


		for(int i=0; i<3; i++) {
			task[i]=sc.nextInt();
		}

		Arrays.sort(task);

		for(int i=0; i<2; i++) {
			ans+=Math.abs(task[i]-task[i+1]);
		}
		System.out.println(ans);
	}
}