import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;

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

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