import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
 
public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] a_str = in.readLine().split(" ");
    int[] a = new int[3];
    a[0] = Integer.parseInt(a_str[0]);
    a[1] = Integer.parseInt(a_str[1]);
    a[2] = Integer.parseInt(a_str[2]);
    int min = Math.min(Math.min(a[0],a[1]),a[2]);
    int sum = a[0] + a[1] + a[2];
    int max = Math.max(Math.max(a[0],a[1]),a[2]);
    System.out.println(max-(sum-min-max) + (sum-min-max)-min);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] a_str = in.readLine().split(" ");
    int[] a = new int[3];
    a[0] = Integer.parseInt(a_str[0]);
    a[1] = Integer.parseInt(a_str[1]);
    a[2] = Integer.parseInt(a_str[2]);
    int min = Math.min(Math.min(a[0],a[1]),a[2]);
    int sum = a[0] + a[1] + a[2];
    int max = Math.max(Math.max(a[0],a[1]),a[2]);
    System.out.println(max-(sum-min-max) + (sum-min-max)-min);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] a_str = in.readLine().split(" ");
    int[] a = new int[3];
    a[0] = Integer.parseInt(a_str[0]);
    a[1] = Integer.parseInt(a_str[1]);
    a[2] = Integer.parseInt(a_str[2]);
    int min = Math.min(Math.min(a[0],a[1]),a[2]);
    int sum = a[0] + a[1] + a[2];
    int max = Math.max(Math.max(a[0],a[1]),a[2]);
    System.out.println(max-(sum-min-max) + (sum-min-max)-min);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] a_str = in.readLine().split(" ");
    int[] a = new int[3];
    a[0] = Integer.parseInt(a_str[0]);
    a[1] = Integer.parseInt(a_str[1]);
    a[2] = Integer.parseInt(a_str[2]);
    int min = Math.min(Math.min(a[0],a[1]),a[2]);
    int sum = a[0] + a[1] + a[2];
    int max = Math.max(Math.max(a[0],a[1]),a[2]);
    System.out.println(max-(sum-min-max) + (sum-min-max)-min);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] a_str = in.readLine().split(" "); a_str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int[] a = new int[3]; a new int[3] 3 a[0] = Integer.parseInt(a_str[0]) a[0] a 0 Integer.parseInt(a_str[0]) Integer.parseInt Integer a_str[0] a_str 0 a[1] = Integer.parseInt(a_str[1]) a[1] a 1 Integer.parseInt(a_str[1]) Integer.parseInt Integer a_str[1] a_str 1 a[2] = Integer.parseInt(a_str[2]) a[2] a 2 Integer.parseInt(a_str[2]) Integer.parseInt Integer a_str[2] a_str 2 int min = Math.min(Math.min(a[0],a[1]),a[2]); min Math.min(Math.min(a[0],a[1]),a[2]) Math.min Math Math.min(a[0],a[1]) Math.min Math a[0] a 0 a[1] a 1 a[2] a 2 int sum = a[0] + a[1] + a[2]; sum a[0] + a[1] + a[2] a[0] + a[1] + a[2] a[0] a 0 a[1] a 1 a[2] a 2 int max = Math.max(Math.max(a[0],a[1]),a[2]); max Math.max(Math.max(a[0],a[1]),a[2]) Math.max Math Math.max(a[0],a[1]) Math.max Math a[0] a 0 a[1] a 1 a[2] a 2 System.out.println(max-(sum-min-max) + (sum-min-max)-min) System.out.println System.out System System.out max-(sum-min-max) + (sum-min-max)-min max-(sum-min-max) + (sum-min-max) max-(sum-min-max) max (sum-min-max) sum-min-max sum min max (sum-min-max) sum-min-max sum min max min String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] a_str = in.readLine().split(" ");
    int[] a = new int[3];
    a[0] = Integer.parseInt(a_str[0]);
    a[1] = Integer.parseInt(a_str[1]);
    a[2] = Integer.parseInt(a_str[2]);
    int min = Math.min(Math.min(a[0],a[1]),a[2]);
    int sum = a[0] + a[1] + a[2];
    int max = Math.max(Math.max(a[0],a[1]),a[2]);
    System.out.println(max-(sum-min-max) + (sum-min-max)-min);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] a_str = in.readLine().split(" ");
    int[] a = new int[3];
    a[0] = Integer.parseInt(a_str[0]);
    a[1] = Integer.parseInt(a_str[1]);
    a[2] = Integer.parseInt(a_str[2]);
    int min = Math.min(Math.min(a[0],a[1]),a[2]);
    int sum = a[0] + a[1] + a[2];
    int max = Math.max(Math.max(a[0],a[1]),a[2]);
    System.out.println(max-(sum-min-max) + (sum-min-max)-min);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
 
public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] a_str = in.readLine().split(" ");
    int[] a = new int[3];
    a[0] = Integer.parseInt(a_str[0]);
    a[1] = Integer.parseInt(a_str[1]);
    a[2] = Integer.parseInt(a_str[2]);
    int min = Math.min(Math.min(a[0],a[1]),a[2]);
    int sum = a[0] + a[1] + a[2];
    int max = Math.max(Math.max(a[0],a[1]),a[2]);
    System.out.println(max-(sum-min-max) + (sum-min-max)-min);
  }
}