countAvailable ((Range _ b):(xs@((Range c _):_))) maxRange = (c - b - 1) + countAvailable xs maxRange
countAvailable ((Range _ b):(xs@((Range c _):_))) maxRange = (c - b - 1) + countAvailable xs maxRange
countAvailable ((Range _ b):(xs@((Range c _):_))) maxRange = (c - b - 1) + countAvailable xs maxRange