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

PMAX = 1000
s = [0] * (PMAX + 1)
for i in range(PMAX):
    s[i+1] = s[i] + (i + 1)

e = [0] * (N + 1)
for i, p in enumerate(P):
    e[i+1] = e[i] + (s[p] / p)

ans = 0
for i in range(N - K + 1):
    ans = max(ans, e[i+K] - e[i])
print(ans) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K P = tuple(map(int, input().split())) P tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split PMAX = 1000 PMAX 1000 s = [0] * (PMAX + 1) s [0] * (PMAX + 1) [0] 0 PMAX + 1 PMAX 1 for i in range(PMAX):
    s[i+1] = s[i] + (i + 1) i range(PMAX) range PMAX s[i+1] = s[i] + (i + 1) s[i+1] s i+1 i 1 s[i] + (i + 1) s[i] s i i + 1 i 1 e = [0] * (N + 1) e [0] * (N + 1) [0] 0 N + 1 N 1 for i, p in enumerate(P):
    e[i+1] = e[i] + (s[p] / p) i p enumerate(P) enumerate P e[i+1] = e[i] + (s[p] / p) e[i+1] e i+1 i 1 e[i] + (s[p] / p) e[i] e i s[p] / p s[p] s p p ans = 0 ans 0 for i in range(N - K + 1):
    ans = max(ans, e[i+K] - e[i]) i range(N - K + 1) range N - K + 1 N - K N K 1 ans = max(ans, e[i+K] - e[i]) ans max(ans, e[i+K] - e[i]) max ans e[i+K] - e[i] e[i+K] e i+K i K e[i] e i print(ans) print ans ans = max(ans, e[i+K] - e[i]) max(ans, e[i+K] - e[i]) ans K = map(int, input().split()) map(int, input().split()) K s = [0] * (PMAX + 1) [0] * (PMAX + 1) s PMAX = 1000 1000 PMAX e = [0] * (N + 1) [0] * (N + 1) e ans = 0 0 ans P = tuple(map(int, input().split())) tuple(map(int, input().split())) P N, K = map(int, input().split()) map(int, input().split()) N
N, K = map(int, input().split())
P = tuple(map(int, input().split()))

PMAX = 1000
s = [0] * (PMAX + 1)
for i in range(PMAX):
    s[i+1] = s[i] + (i + 1)

e = [0] * (N + 1)
for i, p in enumerate(P):
    e[i+1] = e[i] + (s[p] / p)

ans = 0
for i in range(N - K + 1):
    ans = max(ans, e[i+K] - e[i])
print(ans)