import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int min = Math.min(Math.abs(a-b)+Math.abs(b-c),Math.abs(a-c)+Math.abs(c-b));
    min = Math.min(min,Math.abs(c-a)+Math.abs(a-b));
    System.out.println(min);
  }
} import java.util.Scanner; Scanner java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int min = Math.min(Math.abs(a-b)+Math.abs(b-c),Math.abs(a-c)+Math.abs(c-b));
    min = Math.min(min,Math.abs(c-a)+Math.abs(a-b));
    System.out.println(min);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int min = Math.min(Math.abs(a-b)+Math.abs(b-c),Math.abs(a-c)+Math.abs(c-b));
    min = Math.min(min,Math.abs(c-a)+Math.abs(a-b));
    System.out.println(min);
  } main {
    Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int min = Math.min(Math.abs(a-b)+Math.abs(b-c),Math.abs(a-c)+Math.abs(c-b));
    min = Math.min(min,Math.abs(c-a)+Math.abs(a-b));
    System.out.println(min);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int min = Math.min(Math.abs(a-b)+Math.abs(b-c),Math.abs(a-c)+Math.abs(c-b)); min Math.min(Math.abs(a-b)+Math.abs(b-c),Math.abs(a-c)+Math.abs(c-b)) Math.min Math Math.abs(a-b)+Math.abs(b-c) Math.abs(a-b) Math.abs Math a-b a b Math.abs(b-c) Math.abs Math b-c b c Math.abs(a-c)+Math.abs(c-b) Math.abs(a-c) Math.abs Math a-c a c Math.abs(c-b) Math.abs Math c-b c b min = Math.min(min,Math.abs(c-a)+Math.abs(a-b)) min Math.min(min,Math.abs(c-a)+Math.abs(a-b)) Math.min Math min Math.abs(c-a)+Math.abs(a-b) Math.abs(c-a) Math.abs Math c-a c a Math.abs(a-b) Math.abs Math a-b a b System.out.println(min) System.out.println System.out System System.out min String[] args args
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int min = Math.min(Math.abs(a-b)+Math.abs(b-c),Math.abs(a-c)+Math.abs(c-b));
    min = Math.min(min,Math.abs(c-a)+Math.abs(a-b));
    System.out.println(min);
  }
}
