import std.algorithm;
import std.conv;
import std.math;
import std.stdio;
import std.string;

void main()
{
	auto as = readln.split.to!( int[] );
	writeln( solve( as ) );
}

auto solve( in int[] as )
{
	auto ss = sort( as.dup );
	
	return abs( ss[ 0 ] - ss[ 1 ] ) + abs( ss[ 1 ] - ss[ 2 ] );
}
