import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line[] = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		int c = Integer.parseInt(line[2]);

		int ans[] = { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) };

		Arrays.sort(ans);

		System.out.println(ans[0] + ans[1]);

	}

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

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line[] = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		int c = Integer.parseInt(line[2]);

		int ans[] = { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) };

		Arrays.sort(ans);

		System.out.println(ans[0] + ans[1]);

	}

} Main public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line[] = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		int c = Integer.parseInt(line[2]);

		int ans[] = { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) };

		Arrays.sort(ans);

		System.out.println(ans[0] + ans[1]);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line[] = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		int c = Integer.parseInt(line[2]);

		int ans[] = { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) };

		Arrays.sort(ans);

		System.out.println(ans[0] + ans[1]);

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line[] = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(line[0]); a Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int b = Integer.parseInt(line[1]); b Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 int c = Integer.parseInt(line[2]); c Integer.parseInt(line[2]) Integer.parseInt Integer line[2] line 2 int ans[] = { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) }; ans { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) } Math.abs(a - b) Math.abs Math a - b a b Math.abs(b - c) Math.abs Math b - c b c Math.abs(c - a) Math.abs Math c - a c a Arrays.sort(ans) Arrays.sort Arrays ans System.out.println(ans[0] + ans[1]) System.out.println System.out System System.out ans[0] + ans[1] ans[0] ans 0 ans[1] ans 1 String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line[] = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		int c = Integer.parseInt(line[2]);

		int ans[] = { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) };

		Arrays.sort(ans);

		System.out.println(ans[0] + ans[1]);

	}

} public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line[] = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		int c = Integer.parseInt(line[2]);

		int ans[] = { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) };

		Arrays.sort(ans);

		System.out.println(ans[0] + ans[1]);

	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line[] = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		int c = Integer.parseInt(line[2]);

		int ans[] = { Math.abs(a - b), Math.abs(b - c), Math.abs(c - a) };

		Arrays.sort(ans);

		System.out.println(ans[0] + ans[1]);

	}

}
