import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		try (Scanner sc = new Scanner(System.in);) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		}
	}
} import java.io.IOException; IOException java.io import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		try (Scanner sc = new Scanner(System.in);) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		}
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {
		try (Scanner sc = new Scanner(System.in);) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		}
	} main {
		try (Scanner sc = new Scanner(System.in);) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		}
	} try (Scanner sc = new Scanner(System.in);) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		} {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) 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 int all = 0; all 0 List<Integer> list = new ArrayList<>(); list new ArrayList<>() list.add(a) list.add list a list.add(b) list.add list b list.add(c) list.add list c Collections.sort(list) Collections.sort Collections list all += Math.abs(list.get(0) - list.get(1)) all Math.abs(list.get(0) - list.get(1)) Math.abs Math list.get(0) - list.get(1) list.get(0) list.get list 0 list.get(1) list.get list 1 all += Math.abs(list.get(1) - list.get(2)) all Math.abs(list.get(1) - list.get(2)) Math.abs Math list.get(1) - list.get(2) list.get(1) list.get list 1 list.get(2) list.get list 2 System.out.println(all) System.out.println System.out System System.out all String[] args args public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		try (Scanner sc = new Scanner(System.in);) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		}
	}
} public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		try (Scanner sc = new Scanner(System.in);) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		}
	}
} Main
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		try (Scanner sc = new Scanner(System.in);) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			int c = Integer.parseInt(sc.next());
			int all = 0;
			List<Integer> list = new ArrayList<>();
			list.add(a);
			list.add(b);
			list.add(c);

			Collections.sort(list);
			all += Math.abs(list.get(0) - list.get(1));
			all += Math.abs(list.get(1) - list.get(2));

			System.out.println(all);

		}
	}
}
