import 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 x =  Math.abs((c-a)+(b-c));
         int y =  Math.abs((b-c)+(a-b));
         int z =  Math.abs((a-b)+(c-a));
         
         int d =  Math.max(x,y);
         int e =  Math.max(d,z);
      
         System.out.println(e);
        
    }
} import java.util.*; util.* java 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 x =  Math.abs((c-a)+(b-c));
         int y =  Math.abs((b-c)+(a-b));
         int z =  Math.abs((a-b)+(c-a));
         
         int d =  Math.max(x,y);
         int e =  Math.max(d,z);
      
         System.out.println(e);
        
    }
} 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 x =  Math.abs((c-a)+(b-c));
         int y =  Math.abs((b-c)+(a-b));
         int z =  Math.abs((a-b)+(c-a));
         
         int d =  Math.max(x,y);
         int e =  Math.max(d,z);
      
         System.out.println(e);
        
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
      
         int x =  Math.abs((c-a)+(b-c));
         int y =  Math.abs((b-c)+(a-b));
         int z =  Math.abs((a-b)+(c-a));
         
         int d =  Math.max(x,y);
         int e =  Math.max(d,z);
      
         System.out.println(e);
        
    } 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 x =  Math.abs((c-a)+(b-c)); x Math.abs((c-a)+(b-c)) Math.abs Math (c-a)+(b-c) (c-a) c a (b-c) b c int y =  Math.abs((b-c)+(a-b)); y Math.abs((b-c)+(a-b)) Math.abs Math (b-c)+(a-b) (b-c) b c (a-b) a b int z =  Math.abs((a-b)+(c-a)); z Math.abs((a-b)+(c-a)) Math.abs Math (a-b)+(c-a) (a-b) a b (c-a) c a int d =  Math.max(x,y); d Math.max(x,y) Math.max Math x y int e =  Math.max(d,z); e Math.max(d,z) Math.max Math d z System.out.println(e) System.out.println System.out System System.out e String[] args args
import 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 x =  Math.abs((c-a)+(b-c));
         int y =  Math.abs((b-c)+(a-b));
         int z =  Math.abs((a-b)+(c-a));
         
         int d =  Math.max(x,y);
         int e =  Math.max(d,z);
      
         System.out.println(e);
        
    }
}