import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int d = Math.abs(a-b);
		int e = Math.abs(b-c);
		int f = Math.abs(c-a);
		int g = d+e;
		int h = e+f;
		int i = f+d;
		int min = Math.min(g, h);
		min = Math.min(min, i);
		System.out.println(min);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int d = Math.abs(a-b);
		int e = Math.abs(b-c);
		int f = Math.abs(c-a);
		int g = d+e;
		int h = e+f;
		int i = f+d;
		int min = Math.min(g, h);
		min = Math.min(min, i);
		System.out.println(min);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int d = Math.abs(a-b);
		int e = Math.abs(b-c);
		int f = Math.abs(c-a);
		int g = d+e;
		int h = e+f;
		int i = f+d;
		int min = Math.min(g, h);
		min = Math.min(min, i);
		System.out.println(min);
	} main {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int d = Math.abs(a-b);
		int e = Math.abs(b-c);
		int f = Math.abs(c-a);
		int g = d+e;
		int h = e+f;
		int i = f+d;
		int min = Math.min(g, h);
		min = Math.min(min, i);
		System.out.println(min);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan int d = Math.abs(a-b); d Math.abs(a-b) Math.abs Math a-b a b int e = Math.abs(b-c); e Math.abs(b-c) Math.abs Math b-c b c int f = Math.abs(c-a); f Math.abs(c-a) Math.abs Math c-a c a int g = d+e; g d+e d e int h = e+f; h e+f e f int i = f+d; i f+d f d int min = Math.min(g, h); min Math.min(g, h) Math.min Math g h min = Math.min(min, i) min Math.min(min, i) Math.min Math min i System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int d = Math.abs(a-b);
		int e = Math.abs(b-c);
		int f = Math.abs(c-a);
		int g = d+e;
		int h = e+f;
		int i = f+d;
		int min = Math.min(g, h);
		min = Math.min(min, i);
		System.out.println(min);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int d = Math.abs(a-b);
		int e = Math.abs(b-c);
		int f = Math.abs(c-a);
		int g = d+e;
		int h = e+f;
		int i = f+d;
		int min = Math.min(g, h);
		min = Math.min(min, i);
		System.out.println(min);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int d = Math.abs(a-b);
		int e = Math.abs(b-c);
		int f = Math.abs(c-a);
		int g = d+e;
		int h = e+f;
		int i = f+d;
		int min = Math.min(g, h);
		min = Math.min(min, i);
		System.out.println(min);
	}
}
