import java.util.Arrays;
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();
		int ans = 0;

		int [] list = new int [] {A1, A2, A3};
		Arrays.sort(list);

		ans = (list[1] - list[0]) + (list[2] - list[1]) ;
		System.out.println( ans );
	}
} import java.util.Arrays; Arrays 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();
		int ans = 0;

		int [] list = new int [] {A1, A2, A3};
		Arrays.sort(list);

		ans = (list[1] - list[0]) + (list[2] - list[1]) ;
		System.out.println( ans );
	}
} 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();
		int ans = 0;

		int [] list = new int [] {A1, A2, A3};
		Arrays.sort(list);

		ans = (list[1] - list[0]) + (list[2] - list[1]) ;
		System.out.println( ans );
	} main {
		Scanner sc = new Scanner(System.in);

		int A1 = sc.nextInt();
		int A2 = sc.nextInt();
		int A3 = sc.nextInt();
		int ans = 0;

		int [] list = new int [] {A1, A2, A3};
		Arrays.sort(list);

		ans = (list[1] - list[0]) + (list[2] - list[1]) ;
		System.out.println( ans );
	} 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 int ans = 0; ans 0 int [] list = new int [] {A1, A2, A3}; list new int [] {A1, A2, A3} Arrays.sort(list) Arrays.sort Arrays list ans = (list[1] - list[0]) + (list[2] - list[1]) ans (list[1] - list[0]) + (list[2] - list[1]) (list[1] - list[0]) list[1] list 1 list[0] list 0 (list[2] - list[1]) list[2] list 2 list[1] list 1 System.out.println( ans ) System.out.println System.out System System.out ans 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();
		int ans = 0;

		int [] list = new int [] {A1, A2, A3};
		Arrays.sort(list);

		ans = (list[1] - list[0]) + (list[2] - list[1]) ;
		System.out.println( ans );
	}
} 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();
		int ans = 0;

		int [] list = new int [] {A1, A2, A3};
		Arrays.sort(list);

		ans = (list[1] - list[0]) + (list[2] - list[1]) ;
		System.out.println( ans );
	}
} Main
import java.util.Arrays;
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();
		int ans = 0;

		int [] list = new int [] {A1, A2, A3};
		Arrays.sort(list);

		ans = (list[1] - list[0]) + (list[2] - list[1]) ;
		System.out.println( ans );
	}
}