n,k = map(int,input().split())
p = list(map(int,input().split()))

pp = list(map(lambda x:(x+1)/2,p))

p_rui = [pp[0]]
for i in range(1,n):
    p_rui.append(p_rui[i-1]+pp[i])



walist=[p_rui[k-1]]
for i in range(0,n-k):
    walist += [p_rui[k+i]-p_rui[i]]

print(max(walist))

 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 pp = list(map(lambda x:(x+1)/2,p)) pp list(map(lambda x:(x+1)/2,p)) list map(lambda x:(x+1)/2,p) map lambda x:(x+1)/2 (x+1)/2 x+1 x 1 2 x p p_rui = [pp[0]] p_rui [pp[0]] pp[0] pp 0 for i in range(1,n):
    p_rui.append(p_rui[i-1]+pp[i]) i range(1,n) range 1 n p_rui.append(p_rui[i-1]+pp[i]) p_rui.append p_rui append p_rui[i-1]+pp[i] p_rui[i-1] p_rui i-1 i 1 pp[i] pp i walist=[p_rui[k-1]] walist [p_rui[k-1]] p_rui[k-1] p_rui k-1 k 1 for i in range(0,n-k):
    walist += [p_rui[k+i]-p_rui[i]] i range(0,n-k) range 0 n-k n k walist += [p_rui[k+i]-p_rui[i]] walist [p_rui[k+i]-p_rui[i]] p_rui[k+i]-p_rui[i] p_rui[k+i] p_rui k+i k i p_rui[i] p_rui i print(max(walist)) print max(walist) max walist k = map(int,input().split()) map(int,input().split()) k p_rui = [pp[0]] [pp[0]] p_rui pp = list(map(lambda x:(x+1)/2,p)) list(map(lambda x:(x+1)/2,p)) pp p = list(map(int,input().split())) list(map(int,input().split())) p walist += [p_rui[k+i]-p_rui[i]] [p_rui[k+i]-p_rui[i]] walist n,k = map(int,input().split()) map(int,input().split()) n walist=[p_rui[k-1]] [p_rui[k-1]] walist
n,k = map(int,input().split())
p = list(map(int,input().split()))

pp = list(map(lambda x:(x+1)/2,p))

p_rui = [pp[0]]
for i in range(1,n):
    p_rui.append(p_rui[i-1]+pp[i])



walist=[p_rui[k-1]]
for i in range(0,n-k):
    walist += [p_rui[k+i]-p_rui[i]]

print(max(walist))


