import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
int[] ary = new int[3];
		ary[0] = sc.nextInt();
		ary[1] = sc.nextInt();
		ary[2] = sc.nextInt();
		
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}
if(ary[1] > ary[2]){
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
}
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}

int cost = 0;
cost += Math.abs(ary[1]-ary[0]);
cost += Math.abs(ary[2]-ary[1]);
System.out.println(cost);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
int[] ary = new int[3];
		ary[0] = sc.nextInt();
		ary[1] = sc.nextInt();
		ary[2] = sc.nextInt();
		
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}
if(ary[1] > ary[2]){
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
}
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}

int cost = 0;
cost += Math.abs(ary[1]-ary[0]);
cost += Math.abs(ary[2]-ary[1]);
System.out.println(cost);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
int[] ary = new int[3];
		ary[0] = sc.nextInt();
		ary[1] = sc.nextInt();
		ary[2] = sc.nextInt();
		
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}
if(ary[1] > ary[2]){
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
}
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}

int cost = 0;
cost += Math.abs(ary[1]-ary[0]);
cost += Math.abs(ary[2]-ary[1]);
System.out.println(cost);
	} main {
		Scanner sc = new Scanner(System.in);
int[] ary = new int[3];
		ary[0] = sc.nextInt();
		ary[1] = sc.nextInt();
		ary[2] = sc.nextInt();
		
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}
if(ary[1] > ary[2]){
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
}
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}

int cost = 0;
cost += Math.abs(ary[1]-ary[0]);
cost += Math.abs(ary[2]-ary[1]);
System.out.println(cost);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] ary = new int[3]; ary new int[3] 3 ary[0] = sc.nextInt() ary[0] ary 0 sc.nextInt() sc.nextInt sc ary[1] = sc.nextInt() ary[1] ary 1 sc.nextInt() sc.nextInt sc ary[2] = sc.nextInt() ary[2] ary 2 sc.nextInt() sc.nextInt sc if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
} ary[0] > ary[1] ary[0] ary 0 ary[1] ary 1 {
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
} int cap = ary[0]; cap ary[0] ary 0 ary[0] = ary[1] ary[0] ary 0 ary[1] ary 1 ary[1] = cap ary[1] ary 1 cap if(ary[1] > ary[2]){
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
} ary[1] > ary[2] ary[1] ary 1 ary[2] ary 2 {
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
} int cap = ary[1]; cap ary[1] ary 1 ary[1] = ary[2] ary[1] ary 1 ary[2] ary 2 ary[2] = cap ary[2] ary 2 cap if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
} ary[0] > ary[1] ary[0] ary 0 ary[1] ary 1 {
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
} int cap = ary[0]; cap ary[0] ary 0 ary[0] = ary[1] ary[0] ary 0 ary[1] ary 1 ary[1] = cap ary[1] ary 1 cap int cost = 0; cost 0 cost += Math.abs(ary[1]-ary[0]) cost Math.abs(ary[1]-ary[0]) Math.abs Math ary[1]-ary[0] ary[1] ary 1 ary[0] ary 0 cost += Math.abs(ary[2]-ary[1]) cost Math.abs(ary[2]-ary[1]) Math.abs Math ary[2]-ary[1] ary[2] ary 2 ary[1] ary 1 System.out.println(cost) System.out.println System.out System System.out cost String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
int[] ary = new int[3];
		ary[0] = sc.nextInt();
		ary[1] = sc.nextInt();
		ary[2] = sc.nextInt();
		
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}
if(ary[1] > ary[2]){
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
}
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}

int cost = 0;
cost += Math.abs(ary[1]-ary[0]);
cost += Math.abs(ary[2]-ary[1]);
System.out.println(cost);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
int[] ary = new int[3];
		ary[0] = sc.nextInt();
		ary[1] = sc.nextInt();
		ary[2] = sc.nextInt();
		
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}
if(ary[1] > ary[2]){
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
}
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}

int cost = 0;
cost += Math.abs(ary[1]-ary[0]);
cost += Math.abs(ary[2]-ary[1]);
System.out.println(cost);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
int[] ary = new int[3];
		ary[0] = sc.nextInt();
		ary[1] = sc.nextInt();
		ary[2] = sc.nextInt();
		
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}
if(ary[1] > ary[2]){
int cap = ary[1];
ary[1] = ary[2];
ary[2] = cap;
}
if(ary[0] > ary[1]){
int cap = ary[0];
ary[0] = ary[1];
ary[1] = cap;
}

int cost = 0;
cost += Math.abs(ary[1]-ary[0]);
cost += Math.abs(ary[2]-ary[1]);
System.out.println(cost);
	}
}