
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int a[] = new int[3];
		int min = 0;

		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
		}

		sc.close();

		Arrays.sort(a);

		min = a[1] - a[0];
		min += a[2] - a[1];

		System.out.print(min);

	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int a[] = new int[3];
		int min = 0;

		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
		}

		sc.close();

		Arrays.sort(a);

		min = a[1] - a[0];
		min += a[2] - a[1];

		System.out.print(min);

	}
} Main public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int a[] = new int[3];
		int min = 0;

		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
		}

		sc.close();

		Arrays.sort(a);

		min = a[1] - a[0];
		min += a[2] - a[1];

		System.out.print(min);

	} main {

		Scanner sc = new Scanner(System.in);

		int a[] = new int[3];
		int min = 0;

		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
		}

		sc.close();

		Arrays.sort(a);

		min = a[1] - a[0];
		min += a[2] - a[1];

		System.out.print(min);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a[] = new int[3]; a new int[3] 3 int min = 0; min 0 for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			a[i] = sc.nextInt();
		} {
			a[i] = sc.nextInt();
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc sc.close() sc.close sc Arrays.sort(a) Arrays.sort Arrays a min = a[1] - a[0] min a[1] - a[0] a[1] a 1 a[0] a 0 min += a[2] - a[1] min a[2] - a[1] a[2] a 2 a[1] a 1 System.out.print(min) System.out.print System.out System System.out min String arg[] arg public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int a[] = new int[3];
		int min = 0;

		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
		}

		sc.close();

		Arrays.sort(a);

		min = a[1] - a[0];
		min += a[2] - a[1];

		System.out.print(min);

	}
} public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int a[] = new int[3];
		int min = 0;

		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
		}

		sc.close();

		Arrays.sort(a);

		min = a[1] - a[0];
		min += a[2] - a[1];

		System.out.print(min);

	}
} Main

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int a[] = new int[3];
		int min = 0;

		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
		}

		sc.close();

		Arrays.sort(a);

		min = a[1] - a[0];
		min += a[2] - a[1];

		System.out.print(min);

	}
}
