arr = [] while gets != nil do arr << $_.to_i end arr = arr.drop(2) puts (arr.max - arr.min)