N, K = map(int, input().split())
P = list(map(int, input().split()))
E = [(p+1)/2.0 for p in P]
tmp = sum(E[0:K])
ans = tmp
for i in range(1, N-K+1):
    tmp = tmp - E[i-1] + E[i+K-1]
    ans = max(ans, tmp)
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 (p+1)/2.0 for p in P for p in P p P for p in P (p+1)/2.0 p+1 p 1 2.0 E = [(p+1)/2.0 for p in P] E [(p+1)/2.0 for p in P] tmp = sum(E[0:K]) tmp sum(E[0:K]) sum E[0:K] E 0:K 0 K ans = tmp ans tmp for i in range(1, N-K+1):
    tmp = tmp - E[i-1] + E[i+K-1]
    ans = max(ans, tmp) i range(1, N-K+1) range 1 N-K+1 N-K N K 1 tmp = tmp - E[i-1] + E[i+K-1] tmp tmp - E[i-1] + E[i+K-1] tmp - E[i-1] tmp E[i-1] E i-1 i 1 E[i+K-1] E i+K-1 i+K i K 1 ans = max(ans, tmp) ans max(ans, tmp) max ans tmp print(ans) print ans K = map(int, input().split()) map(int, input().split()) K tmp = tmp - E[i-1] + E[i+K-1] tmp - E[i-1] + E[i+K-1] tmp P = list(map(int, input().split())) list(map(int, input().split())) P ans = tmp tmp ans N, K = map(int, input().split()) map(int, input().split()) N E = [(p+1)/2.0 for p in P] [(p+1)/2.0 for p in P] E tmp = sum(E[0:K]) sum(E[0:K]) tmp ans = max(ans, tmp) max(ans, tmp) ans
N, K = map(int, input().split())
P = list(map(int, input().split()))
E = [(p+1)/2.0 for p in P]
tmp = sum(E[0:K])
ans = tmp
for i in range(1, N-K+1):
    tmp = tmp - E[i-1] + E[i+K-1]
    ans = max(ans, tmp)
print(ans)