import java.lang.*;
import java.io.*;
import java.util.*;

class Main{
	public static void main(String args[]) throws FileNotFoundException{
		Scanner sc=new Scanner(System.in);
		
		String[] buf=sc.nextLine().split(" ");
		int[] n=new int[3];
		n[0]=Integer.parseInt(buf[0]);
		n[1]=Integer.parseInt(buf[1]);
		n[2]=Integer.parseInt(buf[2]);
		Arrays.sort(n);
		System.out.println((n[2]-n[1])+(n[1]-n[0]));
		
			
	}

	static void disp(int[] data){
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	}
} import java.lang.*; lang.* java import java.io.*; io.* java import java.util.*; util.* java class Main{
	public static void main(String args[]) throws FileNotFoundException{
		Scanner sc=new Scanner(System.in);
		
		String[] buf=sc.nextLine().split(" ");
		int[] n=new int[3];
		n[0]=Integer.parseInt(buf[0]);
		n[1]=Integer.parseInt(buf[1]);
		n[2]=Integer.parseInt(buf[2]);
		Arrays.sort(n);
		System.out.println((n[2]-n[1])+(n[1]-n[0]));
		
			
	}

	static void disp(int[] data){
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	}
} Main public static void main(String args[]) throws FileNotFoundException{
		Scanner sc=new Scanner(System.in);
		
		String[] buf=sc.nextLine().split(" ");
		int[] n=new int[3];
		n[0]=Integer.parseInt(buf[0]);
		n[1]=Integer.parseInt(buf[1]);
		n[2]=Integer.parseInt(buf[2]);
		Arrays.sort(n);
		System.out.println((n[2]-n[1])+(n[1]-n[0]));
		
			
	} main {
		Scanner sc=new Scanner(System.in);
		
		String[] buf=sc.nextLine().split(" ");
		int[] n=new int[3];
		n[0]=Integer.parseInt(buf[0]);
		n[1]=Integer.parseInt(buf[1]);
		n[2]=Integer.parseInt(buf[2]);
		Arrays.sort(n);
		System.out.println((n[2]-n[1])+(n[1]-n[0]));
		
			
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String[] buf=sc.nextLine().split(" "); buf sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int[] n=new int[3]; n new int[3] 3 n[0]=Integer.parseInt(buf[0]) n[0] n 0 Integer.parseInt(buf[0]) Integer.parseInt Integer buf[0] buf 0 n[1]=Integer.parseInt(buf[1]) n[1] n 1 Integer.parseInt(buf[1]) Integer.parseInt Integer buf[1] buf 1 n[2]=Integer.parseInt(buf[2]) n[2] n 2 Integer.parseInt(buf[2]) Integer.parseInt Integer buf[2] buf 2 Arrays.sort(n) Arrays.sort Arrays n System.out.println((n[2]-n[1])+(n[1]-n[0])) System.out.println System.out System System.out (n[2]-n[1])+(n[1]-n[0]) (n[2]-n[1]) n[2] n 2 n[1] n 1 (n[1]-n[0]) n[1] n 1 n[0] n 0 String args[] args static void disp(int[] data){
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	} disp {
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	} for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		} int i=0; int i=0; i 0 i<data.length i data.length data data.length i++ i++ i {
				System.out.printf("%d ",data[i]);
		} {
				System.out.printf("%d ",data[i]);
		} System.out.printf("%d ",data[i]) System.out.printf System.out System System.out "%d " data[i] data i System.out.println() System.out.println System.out System System.out int[] data data
import java.lang.*;
import java.io.*;
import java.util.*;

class Main{
	public static void main(String args[]) throws FileNotFoundException{
		Scanner sc=new Scanner(System.in);
		
		String[] buf=sc.nextLine().split(" ");
		int[] n=new int[3];
		n[0]=Integer.parseInt(buf[0]);
		n[1]=Integer.parseInt(buf[1]);
		n[2]=Integer.parseInt(buf[2]);
		Arrays.sort(n);
		System.out.println((n[2]-n[1])+(n[1]-n[0]));
		
			
	}

	static void disp(int[] data){
		for(int i=0; i<data.length; i++){
				System.out.printf("%d ",data[i]);
		}
			System.out.println();
	}
}
