import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A1 = scan.nextInt();
		int A2 = scan.nextInt();
		int A3 = scan.nextInt();
		scan.close();
		
		int max = 0;
		int mid = 0;
		int min = 0;
		if (A1 > A2) {
			max = A1;
			min = A2;
		} else {
			max = A2;
			min = A1;
		}
		
		if (max < A3) {
			max = A3;
			mid = max;
		} else {
			mid = A3;
		}
		
		if (mid < min) {
			int tmp = mid;
			mid = min;
			min = tmp;
		}
		
		int ans1 = 0;
		ans1 = mid - max;
		if (ans1 < 0) {
			ans1 = ans1 * -1;
		}
		
		int ans2 = 0;
		ans2 = min - mid;
		if (ans2 < 0) {
			ans2 = ans2 * -1;
		}
		System.out.print(ans1 + ans2); 
	}
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz