import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		int a[] = new int[3];
		for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		}

		Collections.sort(list, Collections.reverseOrder());

		int sum = 0;
		int buf = 0;
		int count = 0;
		for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		}
		System.out.println(sum);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		int a[] = new int[3];
		for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		}

		Collections.sort(list, Collections.reverseOrder());

		int sum = 0;
		int buf = 0;
		int count = 0;
		for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		}
		System.out.println(sum);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		int a[] = new int[3];
		for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		}

		Collections.sort(list, Collections.reverseOrder());

		int sum = 0;
		int buf = 0;
		int count = 0;
		for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		}
		System.out.println(sum);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		int a[] = new int[3];
		for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		}

		Collections.sort(list, Collections.reverseOrder());

		int sum = 0;
		int buf = 0;
		int count = 0;
		for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		}
		System.out.println(sum);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) ArrayList<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() int a[] = new int[3]; a new int[3] 3 for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			list.add(scanner.nextInt());
		} {
			list.add(scanner.nextInt());
		} list.add(scanner.nextInt()) list.add list scanner.nextInt() scanner.nextInt scanner Collections.sort(list, Collections.reverseOrder()) Collections.sort Collections list Collections.reverseOrder() Collections.reverseOrder Collections int sum = 0; sum 0 int buf = 0; buf 0 int count = 0; count 0 for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		} int i list {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		} {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		} if(count != 0) {
				sum += (buf - i);
			} count != 0 count 0 {
				sum += (buf - i);
			} sum += (buf - i) sum (buf - i) buf i count++ count buf = i buf i System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		int a[] = new int[3];
		for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		}

		Collections.sort(list, Collections.reverseOrder());

		int sum = 0;
		int buf = 0;
		int count = 0;
		for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		}
		System.out.println(sum);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		int a[] = new int[3];
		for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		}

		Collections.sort(list, Collections.reverseOrder());

		int sum = 0;
		int buf = 0;
		int count = 0;
		for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		}
		System.out.println(sum);
	}

} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		int a[] = new int[3];
		for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		}

		Collections.sort(list, Collections.reverseOrder());

		int sum = 0;
		int buf = 0;
		int count = 0;
		for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		}
		System.out.println(sum);
	}

}