import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		ArrayList<Integer> A = new ArrayList<>();
		for(int i = 0 ; i < 3 ; i++){
			A.add(sc.nextInt());
		}
		Collections.sort(A);
		int tmp=0;
		int cost= 0 ;
		for(int j = 0 ; j < 3 ; j++){
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		}
		System.out.println(cost);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		ArrayList<Integer> A = new ArrayList<>();
		for(int i = 0 ; i < 3 ; i++){
			A.add(sc.nextInt());
		}
		Collections.sort(A);
		int tmp=0;
		int cost= 0 ;
		for(int j = 0 ; j < 3 ; j++){
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		}
		System.out.println(cost);
	}
} Main public static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){
		ArrayList<Integer> A = new ArrayList<>();
		for(int i = 0 ; i < 3 ; i++){
			A.add(sc.nextInt());
		}
		Collections.sort(A);
		int tmp=0;
		int cost= 0 ;
		for(int j = 0 ; j < 3 ; j++){
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		}
		System.out.println(cost);
	} main {
		ArrayList<Integer> A = new ArrayList<>();
		for(int i = 0 ; i < 3 ; i++){
			A.add(sc.nextInt());
		}
		Collections.sort(A);
		int tmp=0;
		int cost= 0 ;
		for(int j = 0 ; j < 3 ; j++){
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		}
		System.out.println(cost);
	} ArrayList<Integer> A = new ArrayList<>(); A new ArrayList<>() for(int i = 0 ; i < 3 ; i++){
			A.add(sc.nextInt());
		} int i = 0 ; int i = 0 ; i 0 i < 3 i 3 i++ i++ i {
			A.add(sc.nextInt());
		} {
			A.add(sc.nextInt());
		} A.add(sc.nextInt()) A.add A sc.nextInt() sc.nextInt sc Collections.sort(A) Collections.sort Collections A int tmp=0; tmp 0 int cost= 0 ; cost 0 for(int j = 0 ; j < 3 ; j++){
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		} int j = 0 ; int j = 0 ; j 0 j < 3 j 3 j++ j++ j {
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		} {
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		} if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			} j == 0 j 0 tmp = A.get(j) tmp A.get(j) A.get A j {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			} cost += Math.abs(A.get(j)-tmp) cost Math.abs(A.get(j)-tmp) Math.abs Math A.get(j)-tmp A.get(j) A.get A j tmp tmp = A.get(j) tmp A.get(j) A.get A j System.out.println(cost) System.out.println System.out System System.out cost String[] args args public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		ArrayList<Integer> A = new ArrayList<>();
		for(int i = 0 ; i < 3 ; i++){
			A.add(sc.nextInt());
		}
		Collections.sort(A);
		int tmp=0;
		int cost= 0 ;
		for(int j = 0 ; j < 3 ; j++){
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		}
		System.out.println(cost);
	}
} public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		ArrayList<Integer> A = new ArrayList<>();
		for(int i = 0 ; i < 3 ; i++){
			A.add(sc.nextInt());
		}
		Collections.sort(A);
		int tmp=0;
		int cost= 0 ;
		for(int j = 0 ; j < 3 ; j++){
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		}
		System.out.println(cost);
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		ArrayList<Integer> A = new ArrayList<>();
		for(int i = 0 ; i < 3 ; i++){
			A.add(sc.nextInt());
		}
		Collections.sort(A);
		int tmp=0;
		int cost= 0 ;
		for(int j = 0 ; j < 3 ; j++){
			if(j == 0)
				tmp = A.get(j);
			else {
				cost += Math.abs(A.get(j)-tmp);
				tmp = A.get(j);
			}
		}
		System.out.println(cost);
	}
}
