import numpy as np

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



N, K = list(map(int, readline().split()))

A = np.array(readline().split(), dtype=np.int64)

A = np.array([(1+a)/2 for a in A])



Acum = np.zeros(N+1, np.float64)

Acum[1:] = A.cumsum()



x = Acum[K:] - Acum[:-K]

print((x.max()))

import numpy as np

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



N, K = list(map(int, readline().split()))

A = np.array(readline().split(), dtype=np.int64) + 1





Acum = np.zeros(N+1, np.float64)

Acum[1:] = A.cumsum()



x = Acum[K:] - Acum[:-K]

print((x.max()/2))

import numpy as np
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, K = list(map(int, readline().split()))
A = np.array(readline().split(), dtype=np.int64)
A = np.array([(1 + a) / 2 for a in A])
Acum = np.zeros(N + 1, np.float64)
Acum[1:] = A.cumsum()
x = Acum[K:] - Acum[:-K]
print((x.max()))

import numpy as np
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, K = list(map(int, readline().split()))
A = np.array(readline().split(), dtype=np.int64) + 1
Acum = np.zeros(N + 1, np.float64)
Acum[1:] = A.cumsum()
x = Acum[K:] - Acum[:-K]
print((x.max() / 2))

-A = np.array(readline().split(), dtype=np.int64) -A = np.array([(1 + a) / 2 for a in A]) +A = np.array(readline().split(), dtype=np.int64) + 1 -print((x.max())) +print((x.max() / 2))