import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		if(a<b){
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		}else {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		}

	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		if(a<b){
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		}else {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		}

	}
} Main public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		if(a<b){
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		}else {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		}

	} main {
		Scanner sc= new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		if(a<b){
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		}else {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		}

	} Scanner sc= new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(a<b){
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		}else {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		} a<b a b {
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		} if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			} c<a c a {
				System.out.println(b-c);
			} System.out.println(b-c) System.out.println System.out System System.out b-c b c {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			} if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				} b>c b c {
					System.out.println(b-a);
				} System.out.println(b-a) System.out.println System.out System System.out b-a b a {
					System.out.println(c-a);
				} System.out.println(c-a) System.out.println System.out System System.out c-a c a {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		} if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			} b>c b c {
				System.out.println(a-c);
			} System.out.println(a-c) System.out.println System.out System System.out a-c a c {
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			} if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				} a>c a c {
					System.out.println(a-b);
				} System.out.println(a-b) System.out.println System.out System System.out a-b a b {
					System.out.println(c-b);
				} System.out.println(c-b) System.out.println System.out System System.out c-b c b String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		if(a<b){
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		}else {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		}

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		if(a<b){
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		}else {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		}

	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		if(a<b){
			if(c<a){
				System.out.println(b-c);
			}else {
				if(b>c) {
					System.out.println(b-a);
				}else {
					System.out.println(c-a);
				}
			}
		}else {
			if(b>c) {
				System.out.println(a-c);
			}else{
				if(a>c) {
					System.out.println(a-b);
				}else {
					System.out.println(c-b);
				}
			}
		}

	}
}
