import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int s1=Math.abs(a-b)+Math.abs(b-c);
		int s2=Math.abs(a-c)+Math.abs(b-c);
		int s3=Math.abs(a-b)+Math.abs(a-c);
		System.out.println(Math.min(s1, Math.min(s2,s3)));
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int s1=Math.abs(a-b)+Math.abs(b-c);
		int s2=Math.abs(a-c)+Math.abs(b-c);
		int s3=Math.abs(a-b)+Math.abs(a-c);
		System.out.println(Math.min(s1, Math.min(s2,s3)));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int s1=Math.abs(a-b)+Math.abs(b-c);
		int s2=Math.abs(a-c)+Math.abs(b-c);
		int s3=Math.abs(a-b)+Math.abs(a-c);
		System.out.println(Math.min(s1, Math.min(s2,s3)));
	} main {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int s1=Math.abs(a-b)+Math.abs(b-c);
		int s2=Math.abs(a-c)+Math.abs(b-c);
		int s3=Math.abs(a-b)+Math.abs(a-c);
		System.out.println(Math.min(s1, Math.min(s2,s3)));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc int c=sc.nextInt(); c sc.nextInt() sc.nextInt sc int s1=Math.abs(a-b)+Math.abs(b-c); s1 Math.abs(a-b)+Math.abs(b-c) Math.abs(a-b) Math.abs Math a-b a b Math.abs(b-c) Math.abs Math b-c b c int s2=Math.abs(a-c)+Math.abs(b-c); s2 Math.abs(a-c)+Math.abs(b-c) Math.abs(a-c) Math.abs Math a-c a c Math.abs(b-c) Math.abs Math b-c b c int s3=Math.abs(a-b)+Math.abs(a-c); s3 Math.abs(a-b)+Math.abs(a-c) Math.abs(a-b) Math.abs Math a-b a b Math.abs(a-c) Math.abs Math a-c a c System.out.println(Math.min(s1, Math.min(s2,s3))) System.out.println System.out System System.out Math.min(s1, Math.min(s2,s3)) Math.min Math s1 Math.min(s2,s3) Math.min Math s2 s3 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int s1=Math.abs(a-b)+Math.abs(b-c);
		int s2=Math.abs(a-c)+Math.abs(b-c);
		int s3=Math.abs(a-b)+Math.abs(a-c);
		System.out.println(Math.min(s1, Math.min(s2,s3)));
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int s1=Math.abs(a-b)+Math.abs(b-c);
		int s2=Math.abs(a-c)+Math.abs(b-c);
		int s3=Math.abs(a-b)+Math.abs(a-c);
		System.out.println(Math.min(s1, Math.min(s2,s3)));
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int s1=Math.abs(a-b)+Math.abs(b-c);
		int s2=Math.abs(a-c)+Math.abs(b-c);
		int s3=Math.abs(a-b)+Math.abs(a-c);
		System.out.println(Math.min(s1, Math.min(s2,s3)));
	}
}