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

s = 0

for i in range(K):
    s += P[i]

s_max = s

for i in range(N - K):
    s = s - P[i] + P[i+K]
    if s > s_max:
        s_max = s

print((s_max + K) / 2) N, K = list(map(int, input().split())) N list(map(int, input().split())) list 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 s = 0 s 0 for i in range(K):
    s += P[i] i range(K) range K s += P[i] s P[i] P i s_max = s s_max s for i in range(N - K):
    s = s - P[i] + P[i+K]
    if s > s_max:
        s_max = s i range(N - K) range N - K N K s = s - P[i] + P[i+K] s s - P[i] + P[i+K] s - P[i] s P[i] P i P[i+K] P i+K i K if s > s_max:
        s_max = s s > s_max s s_max s_max = s s_max s print((s_max + K) / 2) print (s_max + K) / 2 s_max + K s_max K 2 N, K = list(map(int, input().split())) list(map(int, input().split())) N K = list(map(int, input().split())) list(map(int, input().split())) K s_max = s s s_max s = 0 0 s s += P[i] P[i] s P = list(map(int, input().split())) list(map(int, input().split())) P s_max = s s s_max s = s - P[i] + P[i+K] s - P[i] + P[i+K] s
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))

s = 0

for i in range(K):
    s += P[i]

s_max = s

for i in range(N - K):
    s = s - P[i] + P[i+K]
    if s > s_max:
        s_max = s

print((s_max + K) / 2)