import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) list.add(sc.nextInt());

        List<Integer> sorted = list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
        System.out.println((sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1)));
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Comparator; Comparator java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.stream.Collectors; Collectors java.util.stream public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) list.add(sc.nextInt());

        List<Integer> sorted = list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
        System.out.println((sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1)));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) list.add(sc.nextInt());

        List<Integer> sorted = list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
        System.out.println((sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1)));
    } main {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) list.add(sc.nextInt());

        List<Integer> sorted = list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
        System.out.println((sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1)));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<Integer> list = new ArrayList<>(); list new ArrayList<>() for (int i = 0; i < 3; i++) list.add(sc.nextInt()); int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i list.add(sc.nextInt()); list.add(sc.nextInt()) list.add list sc.nextInt() sc.nextInt sc List<Integer> sorted = list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList()); sorted list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList()) list.stream().sorted(Comparator.naturalOrder()).collect list.stream().sorted(Comparator.naturalOrder()) list.stream().sorted list.stream() list.stream list Comparator.naturalOrder() Comparator.naturalOrder Comparator Collectors.toList() Collectors.toList Collectors System.out.println((sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1))) System.out.println System.out System System.out (sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1)) (sorted.get(1)-sorted.get(0)) sorted.get(1) sorted.get sorted 1 sorted.get(0) sorted.get sorted 0 (sorted.get(2)-sorted.get(1)) sorted.get(2) sorted.get sorted 2 sorted.get(1) sorted.get sorted 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) list.add(sc.nextInt());

        List<Integer> sorted = list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
        System.out.println((sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1)));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) list.add(sc.nextInt());

        List<Integer> sorted = list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
        System.out.println((sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1)));
    }
} Main
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) list.add(sc.nextInt());

        List<Integer> sorted = list.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
        System.out.println((sorted.get(1)-sorted.get(0)) + (sorted.get(2)-sorted.get(1)));
    }
}
