import java.util.Scanner;
import java.util.Comparator;
import java.util.PriorityQueue;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        PriorityQueue<Integer> P = new PriorityQueue<>(Comparator.reverseOrder());
        P.add(Math.abs(A-B));
        P.add(Math.abs(B-C));
        P.add(Math.abs(C-A));
        P.poll();
        System.out.println(P.poll()+P.poll());
        sc.close();
    }
} import java.util.Scanner; Scanner java.util import java.util.Comparator; Comparator java.util import java.util.PriorityQueue; PriorityQueue java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        PriorityQueue<Integer> P = new PriorityQueue<>(Comparator.reverseOrder());
        P.add(Math.abs(A-B));
        P.add(Math.abs(B-C));
        P.add(Math.abs(C-A));
        P.poll();
        System.out.println(P.poll()+P.poll());
        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        PriorityQueue<Integer> P = new PriorityQueue<>(Comparator.reverseOrder());
        P.add(Math.abs(A-B));
        P.add(Math.abs(B-C));
        P.add(Math.abs(C-A));
        P.poll();
        System.out.println(P.poll()+P.poll());
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        PriorityQueue<Integer> P = new PriorityQueue<>(Comparator.reverseOrder());
        P.add(Math.abs(A-B));
        P.add(Math.abs(B-C));
        P.add(Math.abs(C-A));
        P.poll();
        System.out.println(P.poll()+P.poll());
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc PriorityQueue<Integer> P = new PriorityQueue<>(Comparator.reverseOrder()); P new PriorityQueue<>(Comparator.reverseOrder()) P.add(Math.abs(A-B)) P.add P Math.abs(A-B) Math.abs Math A-B A B P.add(Math.abs(B-C)) P.add P Math.abs(B-C) Math.abs Math B-C B C P.add(Math.abs(C-A)) P.add P Math.abs(C-A) Math.abs Math C-A C A P.poll() P.poll P System.out.println(P.poll()+P.poll()) System.out.println System.out System System.out P.poll()+P.poll() P.poll() P.poll P P.poll() P.poll P sc.close() sc.close sc String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        PriorityQueue<Integer> P = new PriorityQueue<>(Comparator.reverseOrder());
        P.add(Math.abs(A-B));
        P.add(Math.abs(B-C));
        P.add(Math.abs(C-A));
        P.poll();
        System.out.println(P.poll()+P.poll());
        sc.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        PriorityQueue<Integer> P = new PriorityQueue<>(Comparator.reverseOrder());
        P.add(Math.abs(A-B));
        P.add(Math.abs(B-C));
        P.add(Math.abs(C-A));
        P.poll();
        System.out.println(P.poll()+P.poll());
        sc.close();
    }
} Main
import java.util.Scanner;
import java.util.Comparator;
import java.util.PriorityQueue;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        PriorityQueue<Integer> P = new PriorityQueue<>(Comparator.reverseOrder());
        P.add(Math.abs(A-B));
        P.add(Math.abs(B-C));
        P.add(Math.abs(C-A));
        P.poll();
        System.out.println(P.poll()+P.poll());
        sc.close();
    }
}