import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/*Atcoder用
 * 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);


		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();
		for(char c:s)System.out.println(c);

		List<Integer> ls = new ArrayList<Integer>();
		String[] tmp = br.readLine().split(" ");
		for (int n = 0; n < N; n++) {
			ls.add(Integer.parseInt(tmp[n]));
		}
 */

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

		List<Integer> ls = new ArrayList<Integer>();
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);

		ls.add(a);
		ls.add(b);
		ls.add(c);

		ls.sort(null);
		int sum = 0;
		for(int i = 0;i<2;i++){
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		}
		System.out.println(sum);




	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

		List<Integer> ls = new ArrayList<Integer>();
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);

		ls.add(a);
		ls.add(b);
		ls.add(c);

		ls.sort(null);
		int sum = 0;
		for(int i = 0;i<2;i++){
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		}
		System.out.println(sum);




	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

		List<Integer> ls = new ArrayList<Integer>();
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);

		ls.add(a);
		ls.add(b);
		ls.add(c);

		ls.sort(null);
		int sum = 0;
		for(int i = 0;i<2;i++){
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		}
		System.out.println(sum);




	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

		List<Integer> ls = new ArrayList<Integer>();
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);

		ls.add(a);
		ls.add(b);
		ls.add(c);

		ls.sort(null);
		int sum = 0;
		for(int i = 0;i<2;i++){
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		}
		System.out.println(sum);




	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] tmp = br.readLine().split(" "); tmp br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " List<Integer> ls = new ArrayList<Integer>(); ls new ArrayList<Integer>() int a = Integer.parseInt(tmp[0]); a Integer.parseInt(tmp[0]) Integer.parseInt Integer tmp[0] tmp 0 int b = Integer.parseInt(tmp[1]); b Integer.parseInt(tmp[1]) Integer.parseInt Integer tmp[1] tmp 1 int c = Integer.parseInt(tmp[2]); c Integer.parseInt(tmp[2]) Integer.parseInt Integer tmp[2] tmp 2 ls.add(a) ls.add ls a ls.add(b) ls.add ls b ls.add(c) ls.add ls c ls.sort(null) ls.sort ls null int sum = 0; sum 0 for(int i = 0;i<2;i++){
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		} int i = 0; int i = 0; i 0 i<2 i 2 i++ i++ i {
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		} {
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		} sum += Math.abs(ls.get(i) - ls.get(i+1)) sum Math.abs(ls.get(i) - ls.get(i+1)) Math.abs Math ls.get(i) - ls.get(i+1) ls.get(i) ls.get ls i ls.get(i+1) ls.get ls i+1 i 1 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) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

		List<Integer> ls = new ArrayList<Integer>();
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);

		ls.add(a);
		ls.add(b);
		ls.add(c);

		ls.sort(null);
		int sum = 0;
		for(int i = 0;i<2;i++){
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		}
		System.out.println(sum);




	}
} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

		List<Integer> ls = new ArrayList<Integer>();
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);

		ls.add(a);
		ls.add(b);
		ls.add(c);

		ls.sort(null);
		int sum = 0;
		for(int i = 0;i<2;i++){
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		}
		System.out.println(sum);




	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/*Atcoder用
 * 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);


		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();
		for(char c:s)System.out.println(c);

		List<Integer> ls = new ArrayList<Integer>();
		String[] tmp = br.readLine().split(" ");
		for (int n = 0; n < N; n++) {
			ls.add(Integer.parseInt(tmp[n]));
		}
 */

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

		List<Integer> ls = new ArrayList<Integer>();
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);

		ls.add(a);
		ls.add(b);
		ls.add(c);

		ls.sort(null);
		int sum = 0;
		for(int i = 0;i<2;i++){
			sum += Math.abs(ls.get(i) - ls.get(i+1));
		}
		System.out.println(sum);




	}
}
