a, b, c = gets.split.map(&:to_i).sort puts [b - a, c - b].min