import std.stdio;
import std.ascii;
import std.conv;
import std.string;
import std.algorithm;
import std.range;
import std.functional;
import std.math;
import core.bitop;

void main()
{

    auto a = readln.chomp.split().to!(long[]);
    auto f = (long a, long b, long c) => abs(a - b) + abs(b - c);
    min(f(a[0], a[1], a[2]), f(a[0], a[2], a[1]), f(a[1], a[0], a[2]), f(a[1],
            a[2], a[0]), f(a[2], a[0], a[1]), f(a[2], a[1], a[0])).writeln;
}
