fn main() { let ref mut buf = Vec::new(); std::io::Read::read_to_end(&mut std::io::stdin(), buf).ok(); let mut iter = std::str::from_utf8(buf).unwrap().split_whitespace(); macro_rules! scan { ([$t:tt; $n:expr]) => ((0..$n).map(|_| scan!($t)).collect::>()); (($($t:tt),*)) => (($(scan!($t)),*)); ($t:ty) => (iter.next().unwrap().parse::<$t>().unwrap()); } let (n, m) = scan!((f64, usize)); let b = scan!([f64; m]); let first = b.first().unwrap(); let last = b.last().unwrap(); let mut res = f64::MAX; let mut sum = m as f64; for k in (0..m).rev() { if k == 0 { res = res.min(last - b[0]); } else { sum += last - b[k]; res = res.min(sum / (m - k) as f64); } } let ans = (first - 1.0) + res + (n - last); println!("{}", ans); }