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

p_list_E = []
p_list_E_temp = [1, 1.5, 2, 2.5, 3, 3.5]

for i in range(len(p_list)):
    p_list_E.append((p_list[i]+1)*0.5)
#print(p_list_E)

p_list_sum = [0]
for i in range(0,N):
    p_list_sum.append(p_list_sum[i]+p_list_E[i])
#print(p_list_sum)

ans = 0
for i in range(K,N+1):
    ans = max(ans, p_list_sum[i]-p_list_sum[i-K])
print(ans) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K p_list = list(map(int, input().split())) p_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split p_list_E = [] p_list_E [] p_list_E_temp = [1, 1.5, 2, 2.5, 3, 3.5] p_list_E_temp [1, 1.5, 2, 2.5, 3, 3.5] 1 1.5 2 2.5 3 3.5 for i in range(len(p_list)):
    p_list_E.append((p_list[i]+1)*0.5)
#print(p_list_E) i range(len(p_list)) range len(p_list) len p_list p_list_E.append((p_list[i]+1)*0.5) p_list_E.append p_list_E append (p_list[i]+1)*0.5 p_list[i]+1 p_list[i] p_list i 1 0.5 p_list_sum = [0] p_list_sum [0] 0 for i in range(0,N):
    p_list_sum.append(p_list_sum[i]+p_list_E[i])
#print(p_list_sum) i range(0,N) range 0 N p_list_sum.append(p_list_sum[i]+p_list_E[i]) p_list_sum.append p_list_sum append p_list_sum[i]+p_list_E[i] p_list_sum[i] p_list_sum i p_list_E[i] p_list_E i ans = 0 ans 0 for i in range(K,N+1):
    ans = max(ans, p_list_sum[i]-p_list_sum[i-K]) i range(K,N+1) range K N+1 N 1 ans = max(ans, p_list_sum[i]-p_list_sum[i-K]) ans max(ans, p_list_sum[i]-p_list_sum[i-K]) max ans p_list_sum[i]-p_list_sum[i-K] p_list_sum[i] p_list_sum i p_list_sum[i-K] p_list_sum i-K i K print(ans) print ans p_list_E_temp = [1, 1.5, 2, 2.5, 3, 3.5] [1, 1.5, 2, 2.5, 3, 3.5] p_list_E_temp ans = 0 0 ans ans = max(ans, p_list_sum[i]-p_list_sum[i-K]) max(ans, p_list_sum[i]-p_list_sum[i-K]) ans N, K = map(int, input().split()) map(int, input().split()) N p_list = list(map(int, input().split())) list(map(int, input().split())) p_list K = map(int, input().split()) map(int, input().split()) K p_list_sum = [0] [0] p_list_sum p_list_E = [] [] p_list_E
N, K = map(int, input().split())
p_list = list(map(int, input().split()))

p_list_E = []
p_list_E_temp = [1, 1.5, 2, 2.5, 3, 3.5]

for i in range(len(p_list)):
    p_list_E.append((p_list[i]+1)*0.5)
#print(p_list_E)

p_list_sum = [0]
for i in range(0,N):
    p_list_sum.append(p_list_sum[i]+p_list_E[i])
#print(p_list_sum)

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