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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();

		List<Integer> absList = new ArrayList<Integer>();
		absList.add(Math.abs(a1 - a2));
		absList.add(Math.abs(a2 - a3));
		absList.add(Math.abs(a3 - a1));
		Collections.sort(absList);

		System.out.println(absList.get(0) + absList.get(1));

		sc.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();

		List<Integer> absList = new ArrayList<Integer>();
		absList.add(Math.abs(a1 - a2));
		absList.add(Math.abs(a2 - a3));
		absList.add(Math.abs(a3 - a1));
		Collections.sort(absList);

		System.out.println(absList.get(0) + absList.get(1));

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();

		List<Integer> absList = new ArrayList<Integer>();
		absList.add(Math.abs(a1 - a2));
		absList.add(Math.abs(a2 - a3));
		absList.add(Math.abs(a3 - a1));
		Collections.sort(absList);

		System.out.println(absList.get(0) + absList.get(1));

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();

		List<Integer> absList = new ArrayList<Integer>();
		absList.add(Math.abs(a1 - a2));
		absList.add(Math.abs(a2 - a3));
		absList.add(Math.abs(a3 - a1));
		Collections.sort(absList);

		System.out.println(absList.get(0) + absList.get(1));

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a1 = sc.nextInt(); a1 sc.nextInt() sc.nextInt sc int a2 = sc.nextInt(); a2 sc.nextInt() sc.nextInt sc int a3 = sc.nextInt(); a3 sc.nextInt() sc.nextInt sc List<Integer> absList = new ArrayList<Integer>(); absList new ArrayList<Integer>() absList.add(Math.abs(a1 - a2)) absList.add absList Math.abs(a1 - a2) Math.abs Math a1 - a2 a1 a2 absList.add(Math.abs(a2 - a3)) absList.add absList Math.abs(a2 - a3) Math.abs Math a2 - a3 a2 a3 absList.add(Math.abs(a3 - a1)) absList.add absList Math.abs(a3 - a1) Math.abs Math a3 - a1 a3 a1 Collections.sort(absList) Collections.sort Collections absList System.out.println(absList.get(0) + absList.get(1)) System.out.println System.out System System.out absList.get(0) + absList.get(1) absList.get(0) absList.get absList 0 absList.get(1) absList.get absList 1 sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();

		List<Integer> absList = new ArrayList<Integer>();
		absList.add(Math.abs(a1 - a2));
		absList.add(Math.abs(a2 - a3));
		absList.add(Math.abs(a3 - a1));
		Collections.sort(absList);

		System.out.println(absList.get(0) + absList.get(1));

		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();

		List<Integer> absList = new ArrayList<Integer>();
		absList.add(Math.abs(a1 - a2));
		absList.add(Math.abs(a2 - a3));
		absList.add(Math.abs(a3 - a1));
		Collections.sort(absList);

		System.out.println(absList.get(0) + absList.get(1));

		sc.close();
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();

		List<Integer> absList = new ArrayList<Integer>();
		absList.add(Math.abs(a1 - a2));
		absList.add(Math.abs(a2 - a3));
		absList.add(Math.abs(a3 - a1));
		Collections.sort(absList);

		System.out.println(absList.get(0) + absList.get(1));

		sc.close();
	}
}