gets
gets
a = $stdin.read.split.map(&:to_i)
puts a.max - a.min