import Data.List
import Data.Char
import Data.Maybe
import Control.Monad
import qualified Data.ByteString.Char8 as BS8

main :: IO ()
main = do
    [n, k] <- unfoldr (BS8.readInt . BS8.dropWhile isSpace) <$> BS8.getLine
    p <- unfoldr (BS8.readInt . BS8.dropWhile isSpace) <$> BS8.getLine

    let pd = map (diceAvg . realToFrac) p

    print $ sol n k pd

diceAvg :: Fractional a => a -> a
diceAvg n = (1 + n) / 2

sol :: (Fractional a, Ord a) => Int -> Int -> [a] -> a
sol n k p
    | n >= k = if a > nxt then a else nxt
    | n < k  = a
    where
        r = take k p
        a = sum r
        nxt = sol (n-1) k (tail p)
