A, B, C = gets.split.map(&:to_i) min_cos = [A, B, C].combination(2).map { |a, b| (a - b).abs }.min if (A < B && B < C) || (C < B && B < A) puts 0 else puts min_cos end