N, K = map(int, input().split())

P = list(map(int, input().split()))


def CalculateExpectedValu(n):
    bunbo = 1 / n
    ans = 0

    for i in range(1,n+1):
        ans = ans + (i*bunbo)

    return ans

number = 0
CumulativeSum = [0]

for i in P:
    number = number + CalculateExpectedValu(i)
    CumulativeSum.append(number)

ans = 0



for i in range(0 , (len(CumulativeSum)-K)):
    tmpans = CumulativeSum[i+K] - CumulativeSum[i]
    ans = max(ans, tmpans)

print(ans) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K P = list(map(int, input().split())) P list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def CalculateExpectedValu(n):
    bunbo = 1 / n
    ans = 0

    for i in range(1,n+1):
        ans = ans + (i*bunbo)

    return ans CalculateExpectedValu bunbo = 1 / n bunbo 1 / n 1 n ans = 0 ans 0 for i in range(1,n+1):
        ans = ans + (i*bunbo)

     i range(1,n+1) range 1 n+1 n 1 ans = ans + (i*bunbo) ans ans + (i*bunbo) ans i*bunbo i bunbo return ans ans n n number = 0 number 0 CumulativeSum = [0] CumulativeSum [0] 0 for i in P:
    number = number + CalculateExpectedValu(i)
    CumulativeSum.append(number) i P number = number + CalculateExpectedValu(i) number number + CalculateExpectedValu(i) number CalculateExpectedValu(i) CalculateExpectedValu i CumulativeSum.append(number) CumulativeSum.append CumulativeSum append number ans = 0 ans 0 for i in range(0 , (len(CumulativeSum)-K)):
    tmpans = CumulativeSum[i+K] - CumulativeSum[i]
    ans = max(ans, tmpans) i range(0 , (len(CumulativeSum)-K)) range 0 len(CumulativeSum)-K len(CumulativeSum) len CumulativeSum K tmpans = CumulativeSum[i+K] - CumulativeSum[i] tmpans CumulativeSum[i+K] - CumulativeSum[i] CumulativeSum[i+K] CumulativeSum i+K i K CumulativeSum[i] CumulativeSum i ans = max(ans, tmpans) ans max(ans, tmpans) max ans tmpans print(ans) print ans CumulativeSum = [0] [0] CumulativeSum N, K = map(int, input().split()) map(int, input().split()) N number = number + CalculateExpectedValu(i) number + CalculateExpectedValu(i) number K = map(int, input().split()) map(int, input().split()) K ans = max(ans, tmpans) max(ans, tmpans) ans number = 0 0 number ans = 0 0 ans tmpans = CumulativeSum[i+K] - CumulativeSum[i] CumulativeSum[i+K] - CumulativeSum[i] tmpans P = list(map(int, input().split())) list(map(int, input().split())) P def CalculateExpectedValu(n):
    bunbo = 1 / n
    ans = 0

    for i in range(1,n+1):
        ans = ans + (i*bunbo)

    return ans def CalculateExpectedValu(n):
    bunbo = 1 / n
    ans = 0

    for i in range(1,n+1):
        ans = ans + (i*bunbo)

    return ans CalculateExpectedValu
N, K = map(int, input().split())

P = list(map(int, input().split()))


def CalculateExpectedValu(n):
    bunbo = 1 / n
    ans = 0

    for i in range(1,n+1):
        ans = ans + (i*bunbo)

    return ans

number = 0
CumulativeSum = [0]

for i in P:
    number = number + CalculateExpectedValu(i)
    CumulativeSum.append(number)

ans = 0



for i in range(0 , (len(CumulativeSum)-K)):
    tmpans = CumulativeSum[i+K] - CumulativeSum[i]
    ans = max(ans, tmpans)

print(ans)
