import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a[]=new int[3];
		int z=0;
		while(z<3){
			a[z]=stdIn.nextInt();
			z++;
		}z=0;
		Arrays.sort(a);
		System.out.println((a[1]-a[0])+(a[2]-a[1]));
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a[]=new int[3];
		int z=0;
		while(z<3){
			a[z]=stdIn.nextInt();
			z++;
		}z=0;
		Arrays.sort(a);
		System.out.println((a[1]-a[0])+(a[2]-a[1]));
	}
} Main public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a[]=new int[3];
		int z=0;
		while(z<3){
			a[z]=stdIn.nextInt();
			z++;
		}z=0;
		Arrays.sort(a);
		System.out.println((a[1]-a[0])+(a[2]-a[1]));
	} main {
		Scanner stdIn=new Scanner(System.in);
		int a[]=new int[3];
		int z=0;
		while(z<3){
			a[z]=stdIn.nextInt();
			z++;
		}z=0;
		Arrays.sort(a);
		System.out.println((a[1]-a[0])+(a[2]-a[1]));
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int a[]=new int[3]; a new int[3] 3 int z=0; z 0 while(z<3){
			a[z]=stdIn.nextInt();
			z++;
		} z<3 z 3 {
			a[z]=stdIn.nextInt();
			z++;
		} a[z]=stdIn.nextInt() a[z] a z stdIn.nextInt() stdIn.nextInt stdIn z++ z z=0 z 0 Arrays.sort(a) Arrays.sort Arrays a System.out.println((a[1]-a[0])+(a[2]-a[1])) System.out.println System.out System System.out (a[1]-a[0])+(a[2]-a[1]) (a[1]-a[0]) a[1] a 1 a[0] a 0 (a[2]-a[1]) a[2] a 2 a[1] a 1 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a[]=new int[3];
		int z=0;
		while(z<3){
			a[z]=stdIn.nextInt();
			z++;
		}z=0;
		Arrays.sort(a);
		System.out.println((a[1]-a[0])+(a[2]-a[1]));
	}
} public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a[]=new int[3];
		int z=0;
		while(z<3){
			a[z]=stdIn.nextInt();
			z++;
		}z=0;
		Arrays.sort(a);
		System.out.println((a[1]-a[0])+(a[2]-a[1]));
	}
} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a[]=new int[3];
		int z=0;
		while(z<3){
			a[z]=stdIn.nextInt();
			z++;
		}z=0;
		Arrays.sort(a);
		System.out.println((a[1]-a[0])+(a[2]-a[1]));
	}
}
