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

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int minV = 0;
        int maxV = 0;
        for(int i = 0; i < 3; ++i){
            int num = sc.nextInt();
            if(i == 0){
                minV = num;
                maxV = num;
            }else{
                if(minV > num){
                    minV = num;
                }else if(maxV < num){
                    maxV = num;
                }
            }
        }

        System.out.println(maxV - minV);
    }
}