main = do
  str <- getLine
  let [n, k] = map read (words str) ::[Int]
  str <- getLine
  let p = map read (words str) ::[Int]
  let expect = map (\n -> (fromIntegral $ sum [1..n] ::Double) / (fromIntegral n ::Double)) p
  print $ maximum $ map sum $ mkKs k expect

mkKs :: Int -> [Double] -> [[Double]]
mkKs k list
  | length list == k = [list]
  | otherwise        = (take k list) : (mkKs k $ drop 1 list)
