import java.util.*;
public 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 ab = Math.abs(b - a);
    int bc = Math.abs(c - b);
    int ca = Math.abs(a - c);
    
    if (a <= b && b <= c) {
      System.out.println(ab + bc);
    } else if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    }
  }
} import java.util.*; util.* java public 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 ab = Math.abs(b - a);
    int bc = Math.abs(c - b);
    int ca = Math.abs(a - c);
    
    if (a <= b && b <= c) {
      System.out.println(ab + bc);
    } else if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    }
  }
} 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 ab = Math.abs(b - a);
    int bc = Math.abs(c - b);
    int ca = Math.abs(a - c);
    
    if (a <= b && b <= c) {
      System.out.println(ab + bc);
    } else if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    
    int ab = Math.abs(b - a);
    int bc = Math.abs(c - b);
    int ca = Math.abs(a - c);
    
    if (a <= b && b <= c) {
      System.out.println(ab + bc);
    } else if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    }
  } 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 ab = Math.abs(b - a); ab Math.abs(b - a) Math.abs Math b - a b a int bc = Math.abs(c - b); bc Math.abs(c - b) Math.abs Math c - b c b int ca = Math.abs(a - c); ca Math.abs(a - c) Math.abs Math a - c a c if (a <= b && b <= c) {
      System.out.println(ab + bc);
    } else if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    } a <= b && b <= c a <= b a b b <= c b c {
      System.out.println(ab + bc);
    } System.out.println(ab + bc) System.out.println System.out System System.out ab + bc ab bc if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    } a <= c && c <= b a <= c a c c <= b c b {
      System.out.println(ca + bc);
    } System.out.println(ca + bc) System.out.println System.out System System.out ca + bc ca bc if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    } b <= a && a <= c b <= a b a a <= c a c {
      System.out.println(ab + ca);
    } System.out.println(ab + ca) System.out.println System.out System System.out ab + ca ab ca if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    } b <= c && c <= a b <= c b c c <= a c a {
      System.out.println(bc + ca);
    } System.out.println(bc + ca) System.out.println System.out System System.out bc + ca bc ca if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    } c <= a && a <= b c <= a c a a <= b a b {
      System.out.println(ca + ab);
    } System.out.println(ca + ab) System.out.println System.out System System.out ca + ab ca ab if (c <= b && b <= a) {
      System.out.println(bc + ab);
    } c <= b && b <= a c <= b c b b <= a b a {
      System.out.println(bc + ab);
    } System.out.println(bc + ab) System.out.println System.out System System.out bc + ab bc ab String[] args args public 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 ab = Math.abs(b - a);
    int bc = Math.abs(c - b);
    int ca = Math.abs(a - c);
    
    if (a <= b && b <= c) {
      System.out.println(ab + bc);
    } else if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    }
  }
} public 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 ab = Math.abs(b - a);
    int bc = Math.abs(c - b);
    int ca = Math.abs(a - c);
    
    if (a <= b && b <= c) {
      System.out.println(ab + bc);
    } else if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    }
  }
} Main
import java.util.*;
public 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 ab = Math.abs(b - a);
    int bc = Math.abs(c - b);
    int ca = Math.abs(a - c);
    
    if (a <= b && b <= c) {
      System.out.println(ab + bc);
    } else if (a <= c && c <= b) {
      System.out.println(ca + bc);
    } else if (b <= a && a <= c) {
      System.out.println(ab + ca);
    } else if (b <= c && c <= a) {
      System.out.println(bc + ca);
    } else if (c <= a && a <= b) {
      System.out.println(ca + ab);
    } else if (c <= b && b <= a) {
      System.out.println(bc + ab);
    }
  }
}