import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a1 , a2 , a3 ;
		a1 = scan.nextInt();
		a2 = scan.nextInt();
		a3 = scan.nextInt();
		int diff1 = Math.abs(a1-a2);
		int diff2 = Math.abs(a2-a3);
		int diff3 = Math.abs(a3-a1);
		int sum1 = diff1+diff2;
		int sum2 = diff2+diff3;
		int sum3 = diff3+diff1;
		int min = sum1;
		if(sum2<min)
			min = sum2;
		if(sum3<min)
			min = sum3;
		System.out.println(min);
		scan.close();
	}

}

/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