n,k=map(int,input().split())
data=list(map(float,input().split()))
new_data=[0]*n
for i in range(n):
    new_data[i]=(data[i]+1)/2
temp=0
for i in range(k):
    temp+=new_data[i]
ans=temp
for i in range(n-k):
    temp=temp-new_data[i]+new_data[i+k]
    ans=max(ans,temp)
print(ans) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k data=list(map(float,input().split())) data list(map(float,input().split())) list map(float,input().split()) map float input().split() ().split () input split new_data=[0]*n new_data [0]*n [0] 0 n for i in range(n):
    new_data[i]=(data[i]+1)/2 i range(n) range n new_data[i]=(data[i]+1)/2 new_data[i] new_data i (data[i]+1)/2 data[i]+1 data[i] data i 1 2 temp=0 temp 0 for i in range(k):
    temp+=new_data[i] i range(k) range k temp+=new_data[i] temp new_data[i] new_data i ans=temp ans temp for i in range(n-k):
    temp=temp-new_data[i]+new_data[i+k]
    ans=max(ans,temp) i range(n-k) range n-k n k temp=temp-new_data[i]+new_data[i+k] temp temp-new_data[i]+new_data[i+k] temp-new_data[i] temp new_data[i] new_data i new_data[i+k] new_data i+k i k ans=max(ans,temp) ans max(ans,temp) max ans temp print(ans) print ans temp=0 0 temp ans=temp temp ans n,k=map(int,input().split()) map(int,input().split()) n temp=temp-new_data[i]+new_data[i+k] temp-new_data[i]+new_data[i+k] temp k=map(int,input().split()) map(int,input().split()) k data=list(map(float,input().split())) list(map(float,input().split())) data temp+=new_data[i] new_data[i] temp new_data=[0]*n [0]*n new_data ans=max(ans,temp) max(ans,temp) ans
n,k=map(int,input().split())
data=list(map(float,input().split()))
new_data=[0]*n
for i in range(n):
    new_data[i]=(data[i]+1)/2
temp=0
for i in range(k):
    temp+=new_data[i]
ans=temp
for i in range(n-k):
    temp=temp-new_data[i]+new_data[i+k]
    ans=max(ans,temp)
print(ans)