import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int[] a = new int[3];

		for(int i=0;i<3;i++) {

			a[i] = sc.nextInt();
		}

		int temp = 0;

		for(int i=0;i<2;i++) {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		}


		int ans = 0;

		for(int i=0;i<2;i++) {

			ans += (a[i+1]-a[i]);

		}

		System.out.println(ans);

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int[] a = new int[3];

		for(int i=0;i<3;i++) {

			a[i] = sc.nextInt();
		}

		int temp = 0;

		for(int i=0;i<2;i++) {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		}


		int ans = 0;

		for(int i=0;i<2;i++) {

			ans += (a[i+1]-a[i]);

		}

		System.out.println(ans);

	}

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

		Scanner sc = new Scanner(System.in);

		int[] a = new int[3];

		for(int i=0;i<3;i++) {

			a[i] = sc.nextInt();
		}

		int temp = 0;

		for(int i=0;i<2;i++) {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		}


		int ans = 0;

		for(int i=0;i<2;i++) {

			ans += (a[i+1]-a[i]);

		}

		System.out.println(ans);

	} main {

		Scanner sc = new Scanner(System.in);

		int[] a = new int[3];

		for(int i=0;i<3;i++) {

			a[i] = sc.nextInt();
		}

		int temp = 0;

		for(int i=0;i<2;i++) {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		}


		int ans = 0;

		for(int i=0;i<2;i++) {

			ans += (a[i+1]-a[i]);

		}

		System.out.println(ans);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] a = new int[3]; a new int[3] 3 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 int temp = 0; temp 0 for(int i=0;i<2;i++) {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		} int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		} {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		} for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			} int j=i; int j=i; j i j<3 j 3 j++ j++ j {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			} {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			} if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				} a[i]>a[j] a[i] a i a[j] a j {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				} temp = a[i] temp a[i] a i a[i] = a[j] a[i] a i a[j] a j a[j] = temp a[j] a j temp int ans = 0; ans 0 for(int i=0;i<2;i++) {

			ans += (a[i+1]-a[i]);

		} int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {

			ans += (a[i+1]-a[i]);

		} {

			ans += (a[i+1]-a[i]);

		} ans += (a[i+1]-a[i]) ans (a[i+1]-a[i]) a[i+1] a i+1 i 1 a[i] a i 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[] a = new int[3];

		for(int i=0;i<3;i++) {

			a[i] = sc.nextInt();
		}

		int temp = 0;

		for(int i=0;i<2;i++) {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		}


		int ans = 0;

		for(int i=0;i<2;i++) {

			ans += (a[i+1]-a[i]);

		}

		System.out.println(ans);

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int[] a = new int[3];

		for(int i=0;i<3;i++) {

			a[i] = sc.nextInt();
		}

		int temp = 0;

		for(int i=0;i<2;i++) {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		}


		int ans = 0;

		for(int i=0;i<2;i++) {

			ans += (a[i+1]-a[i]);

		}

		System.out.println(ans);

	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int[] a = new int[3];

		for(int i=0;i<3;i++) {

			a[i] = sc.nextInt();
		}

		int temp = 0;

		for(int i=0;i<2;i++) {

			for(int j=i;j<3;j++) {

				if(a[i]>a[j]) {

					temp = a[i];

					a[i] = a[j];

					a[j] = temp;
				}
			}
		}


		int ans = 0;

		for(int i=0;i<2;i++) {

			ans += (a[i+1]-a[i]);

		}

		System.out.println(ans);

	}

}
