main = do
  n: k: _ <- map read . words <$> getLine :: IO [Int]
  ps <- map read . words <$> getLine :: IO [Int]
  putStrLn $ show $ (\x -> fromIntegral (x+k) / 2 :: Double) $ maximum $ assocSum n k ps

foldlState :: (a -> c -> b -> (a, c)) -> a -> c -> [b] -> a
foldlState f a s l = fst $ foldl (\(a, s) -> f a s) (a, s) l

assocSum n k ps = map sum $ foldlState step (replicate n []) ps [1..k]
    where step qs ps _ = (zipWith (\x ys -> x: ys) ps qs, tail ps)
