import java.util.Scanner;

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 x = Math.abs(a - b);
        int y = Math.abs(b - c);
        int z = Math.abs(c - a);

        if (x <= y) {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } else {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        }

    }
}
 import java.util.Scanner; Scanner 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 x = Math.abs(a - b);
        int y = Math.abs(b - c);
        int z = Math.abs(c - a);

        if (x <= y) {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } else {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        }

    }
} 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(a - b);
        int y = Math.abs(b - c);
        int z = Math.abs(c - a);

        if (x <= y) {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } else {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        }

    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        int x = Math.abs(a - b);
        int y = Math.abs(b - c);
        int z = Math.abs(c - a);

        if (x <= y) {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } else {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        }

    } 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(a - b); x Math.abs(a - b) Math.abs Math a - b a b int y = Math.abs(b - c); y Math.abs(b - c) Math.abs Math b - c b c int z = Math.abs(c - a); z Math.abs(c - a) Math.abs Math c - a c a if (x <= y) {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } else {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        } x <= y x y {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            } y <= z y z {
                System.out.println(x + y);
            } System.out.println(x + y) System.out.println System.out System System.out x + y x y {
                System.out.println(x + z);
            } System.out.println(x + z) System.out.println System.out System System.out x + z x z {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        } if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            } x <= z x z {
                System.out.println(x + y);
            } System.out.println(x + y) System.out.println System.out System System.out x + y x y {
                System.out.println(y + z);
            } System.out.println(y + z) System.out.println System.out System System.out y + z y z 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 x = Math.abs(a - b);
        int y = Math.abs(b - c);
        int z = Math.abs(c - a);

        if (x <= y) {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } else {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        }

    }
} 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 x = Math.abs(a - b);
        int y = Math.abs(b - c);
        int z = Math.abs(c - a);

        if (x <= y) {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } else {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        }

    }
} Main
import java.util.Scanner;

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 x = Math.abs(a - b);
        int y = Math.abs(b - c);
        int z = Math.abs(c - a);

        if (x <= y) {
            if (y <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(x + z);
            }
        } else {
            if (x <= z) {
                System.out.println(x + y);
            } else {
                System.out.println(y + z);
            }
        }

    }
}

