
import Data.Function (on)

sn::Int->Double
sn n = div' (n + 1) 2

div' = (/) `on` fromIntegral

main = do
  [n, k] <- map read . words <$> getLine::IO[Int]
  pn <- map read . words <$> getLine
  let snn = scanl1 (+) $ map sn pn
  print $ maximum $ zipWith subtract snn (drop k snn)