import java.util.*;
    public class Main{
	public static void main(String[] args){
	    Scanner scan = new Scanner(System.in);
	    int[] task = new int[3];
	    List<Integer> taskS = new ArrayList<Integer>();
	    int Answer;
	    for(int i = 0; i < 3; i++){
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    }
	    Collections.sort(taskS);
	    Answer = taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1);
	    System.out.println(Answer);
	}

	
    } import java.util.*; util.* java public class Main{
	public static void main(String[] args){
	    Scanner scan = new Scanner(System.in);
	    int[] task = new int[3];
	    List<Integer> taskS = new ArrayList<Integer>();
	    int Answer;
	    for(int i = 0; i < 3; i++){
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    }
	    Collections.sort(taskS);
	    Answer = taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1);
	    System.out.println(Answer);
	}

	
    } Main public static void main(String[] args){
	    Scanner scan = new Scanner(System.in);
	    int[] task = new int[3];
	    List<Integer> taskS = new ArrayList<Integer>();
	    int Answer;
	    for(int i = 0; i < 3; i++){
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    }
	    Collections.sort(taskS);
	    Answer = taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1);
	    System.out.println(Answer);
	} main {
	    Scanner scan = new Scanner(System.in);
	    int[] task = new int[3];
	    List<Integer> taskS = new ArrayList<Integer>();
	    int Answer;
	    for(int i = 0; i < 3; i++){
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    }
	    Collections.sort(taskS);
	    Answer = taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1);
	    System.out.println(Answer);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] task = new int[3]; task new int[3] 3 List<Integer> taskS = new ArrayList<Integer>(); taskS new ArrayList<Integer>() int Answer; Answer for(int i = 0; i < 3; i++){
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    } {
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    } task[i] = scan.nextInt() task[i] task i scan.nextInt() scan.nextInt scan taskS.add(task[i]) taskS.add taskS task[i] task i Collections.sort(taskS) Collections.sort Collections taskS Answer = taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1) Answer taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1) taskS.get(1)-taskS.get(0)
		+ taskS.get(2) taskS.get(1)-taskS.get(0) taskS.get(1) taskS.get taskS 1 taskS.get(0) taskS.get taskS 0 taskS.get(2) taskS.get taskS 2 taskS.get(1) taskS.get taskS 1 System.out.println(Answer) System.out.println System.out System System.out Answer String[] args args public class Main{
	public static void main(String[] args){
	    Scanner scan = new Scanner(System.in);
	    int[] task = new int[3];
	    List<Integer> taskS = new ArrayList<Integer>();
	    int Answer;
	    for(int i = 0; i < 3; i++){
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    }
	    Collections.sort(taskS);
	    Answer = taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1);
	    System.out.println(Answer);
	}

	
    } public class Main{
	public static void main(String[] args){
	    Scanner scan = new Scanner(System.in);
	    int[] task = new int[3];
	    List<Integer> taskS = new ArrayList<Integer>();
	    int Answer;
	    for(int i = 0; i < 3; i++){
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    }
	    Collections.sort(taskS);
	    Answer = taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1);
	    System.out.println(Answer);
	}

	
    } Main
import java.util.*;
    public class Main{
	public static void main(String[] args){
	    Scanner scan = new Scanner(System.in);
	    int[] task = new int[3];
	    List<Integer> taskS = new ArrayList<Integer>();
	    int Answer;
	    for(int i = 0; i < 3; i++){
		task[i] = scan.nextInt();
		    taskS.add(task[i]);
	    }
	    Collections.sort(taskS);
	    Answer = taskS.get(1)-taskS.get(0)
		+ taskS.get(2)-taskS.get(1);
	    System.out.println(Answer);
	}

	
    }
