import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [n, k] <- getIntList
    ps <- getIntList
    let qs = scanl' (+) 0 $ map (\p -> (fromIntegral (sum [1..p])) / (fromIntegral p)) ps
    print . maximum $ zipWith (-) (drop k qs) qs