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 k ps

assocSum k ps = map (\(x, y) -> abs (x - y)) $ zip qs $ foldl (\a x -> tail a) qs [1..k]
    where qs = scanl (+) 0 ps
