import java.io.*;
import java.util.*;

class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int[] nums = new int[3];
    
    for (int i = 0; i < strs.length; i++) {
      nums[i] = Integer.parseInt(strs[i]);
    }
    Arrays.sort(nums);
    System.out.println((nums[2] - nums[1]) + (nums[1] - nums[0]));
    
  }
} import java.io.*; io.* java import java.util.*; util.* java class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int[] nums = new int[3];
    
    for (int i = 0; i < strs.length; i++) {
      nums[i] = Integer.parseInt(strs[i]);
    }
    Arrays.sort(nums);
    System.out.println((nums[2] - nums[1]) + (nums[1] - nums[0]));
    
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int[] nums = new int[3];
    
    for (int i = 0; i < strs.length; i++) {
      nums[i] = Integer.parseInt(strs[i]);
    }
    Arrays.sort(nums);
    System.out.println((nums[2] - nums[1]) + (nums[1] - nums[0]));
    
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int[] nums = new int[3];
    
    for (int i = 0; i < strs.length; i++) {
      nums[i] = Integer.parseInt(strs[i]);
    }
    Arrays.sort(nums);
    System.out.println((nums[2] - nums[1]) + (nums[1] - nums[0]));
    
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] strs = br.readLine().split(" "); strs br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] nums = new int[3]; nums new int[3] 3 for (int i = 0; i < strs.length; i++) {
      nums[i] = Integer.parseInt(strs[i]);
    } int i = 0; int i = 0; i 0 i < strs.length i strs.length strs strs.length i++ i++ i {
      nums[i] = Integer.parseInt(strs[i]);
    } {
      nums[i] = Integer.parseInt(strs[i]);
    } nums[i] = Integer.parseInt(strs[i]) nums[i] nums i Integer.parseInt(strs[i]) Integer.parseInt Integer strs[i] strs i Arrays.sort(nums) Arrays.sort Arrays nums System.out.println((nums[2] - nums[1]) + (nums[1] - nums[0])) System.out.println System.out System System.out (nums[2] - nums[1]) + (nums[1] - nums[0]) (nums[2] - nums[1]) nums[2] nums 2 nums[1] nums 1 (nums[1] - nums[0]) nums[1] nums 1 nums[0] nums 0 String[] args args
import java.io.*;
import java.util.*;

class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int[] nums = new int[3];
    
    for (int i = 0; i < strs.length; i++) {
      nums[i] = Integer.parseInt(strs[i]);
    }
    Arrays.sort(nums);
    System.out.println((nums[2] - nums[1]) + (nums[1] - nums[0]));
    
  }
}