import java.util.HashSet;
import java.util.Set;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str_as = br.readLine().split(" ");
        int[] as = new int[3];
        as[0] = Integer.parseInt(str_as[0]);
        as[1] = Integer.parseInt(str_as[1]);
        as[2] = Integer.parseInt(str_as[2]);
        Arrays.sort(as);
        int ans = 0;
        
        
        System.out.println(Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1]));
    }
} import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str_as = br.readLine().split(" ");
        int[] as = new int[3];
        as[0] = Integer.parseInt(str_as[0]);
        as[1] = Integer.parseInt(str_as[1]);
        as[2] = Integer.parseInt(str_as[2]);
        Arrays.sort(as);
        int ans = 0;
        
        
        System.out.println(Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1]));
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str_as = br.readLine().split(" ");
        int[] as = new int[3];
        as[0] = Integer.parseInt(str_as[0]);
        as[1] = Integer.parseInt(str_as[1]);
        as[2] = Integer.parseInt(str_as[2]);
        Arrays.sort(as);
        int ans = 0;
        
        
        System.out.println(Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1]));
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str_as = br.readLine().split(" ");
        int[] as = new int[3];
        as[0] = Integer.parseInt(str_as[0]);
        as[1] = Integer.parseInt(str_as[1]);
        as[2] = Integer.parseInt(str_as[2]);
        Arrays.sort(as);
        int ans = 0;
        
        
        System.out.println(Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1]));
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] str_as = br.readLine().split(" "); str_as br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] as = new int[3]; as new int[3] 3 as[0] = Integer.parseInt(str_as[0]) as[0] as 0 Integer.parseInt(str_as[0]) Integer.parseInt Integer str_as[0] str_as 0 as[1] = Integer.parseInt(str_as[1]) as[1] as 1 Integer.parseInt(str_as[1]) Integer.parseInt Integer str_as[1] str_as 1 as[2] = Integer.parseInt(str_as[2]) as[2] as 2 Integer.parseInt(str_as[2]) Integer.parseInt Integer str_as[2] str_as 2 Arrays.sort(as) Arrays.sort Arrays as int ans = 0; ans 0 System.out.println(Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1])) System.out.println System.out System System.out Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1]) Math.abs(as[1]-as[0]) Math.abs Math as[1]-as[0] as[1] as 1 as[0] as 0 Math.abs(as[2]-as[1]) Math.abs Math as[2]-as[1] as[2] as 2 as[1] as 1 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str_as = br.readLine().split(" ");
        int[] as = new int[3];
        as[0] = Integer.parseInt(str_as[0]);
        as[1] = Integer.parseInt(str_as[1]);
        as[2] = Integer.parseInt(str_as[2]);
        Arrays.sort(as);
        int ans = 0;
        
        
        System.out.println(Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1]));
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str_as = br.readLine().split(" ");
        int[] as = new int[3];
        as[0] = Integer.parseInt(str_as[0]);
        as[1] = Integer.parseInt(str_as[1]);
        as[2] = Integer.parseInt(str_as[2]);
        Arrays.sort(as);
        int ans = 0;
        
        
        System.out.println(Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1]));
    }
} Main
import java.util.HashSet;
import java.util.Set;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str_as = br.readLine().split(" ");
        int[] as = new int[3];
        as[0] = Integer.parseInt(str_as[0]);
        as[1] = Integer.parseInt(str_as[1]);
        as[2] = Integer.parseInt(str_as[2]);
        Arrays.sort(as);
        int ans = 0;
        
        
        System.out.println(Math.abs(as[1]-as[0]) + Math.abs(as[2]-as[1]));
    }
}
