n,k=map(int, input().split())
pn = list(map(int, input().split()))
ex_list = [(pn[i]+1)/2 for i in range(len(pn))]
ex_wa_list = []
wa = 0
for i in range(len(ex_list)):
    wa += ex_list[i]
    ex_wa_list.append(wa)
Ans_list = []
wa2 = 0
for i in range(n-k+1):
    if i == 0:
        wa2 = ex_wa_list[k-1]
    else:
        wa2 = ex_wa_list[k-1+i] - ex_wa_list[i-1]
    Ans_list.append(wa2)
print(max(Ans_list)) n,k=map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k pn = list(map(int, input().split())) pn list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split (pn[i]+1)/2 for i in range(len(pn)) for i in range(len(pn)) i range(len(pn)) range len(pn) len pn for i in range(len(pn)) (pn[i]+1)/2 pn[i]+1 pn[i] pn i 1 2 ex_list = [(pn[i]+1)/2 for i in range(len(pn))] ex_list [(pn[i]+1)/2 for i in range(len(pn))] ex_wa_list = [] ex_wa_list [] wa = 0 wa 0 for i in range(len(ex_list)):
    wa += ex_list[i]
    ex_wa_list.append(wa) i range(len(ex_list)) range len(ex_list) len ex_list wa += ex_list[i] wa ex_list[i] ex_list i ex_wa_list.append(wa) ex_wa_list.append ex_wa_list append wa Ans_list = [] Ans_list [] wa2 = 0 wa2 0 for i in range(n-k+1):
    if i == 0:
        wa2 = ex_wa_list[k-1]
    else:
        wa2 = ex_wa_list[k-1+i] - ex_wa_list[i-1]
    Ans_list.append(wa2) i range(n-k+1) range n-k+1 n-k n k 1 if i == 0:
        wa2 = ex_wa_list[k-1]
    else:
        wa2 = ex_wa_list[k-1+i] - ex_wa_list[i-1]
     i == 0 i 0 wa2 = ex_wa_list[k-1] wa2 ex_wa_list[k-1] ex_wa_list k-1 k 1 wa2 = ex_wa_list[k-1+i] - ex_wa_list[i-1] wa2 ex_wa_list[k-1+i] - ex_wa_list[i-1] ex_wa_list[k-1+i] ex_wa_list k-1+i k-1 k 1 i ex_wa_list[i-1] ex_wa_list i-1 i 1 Ans_list.append(wa2) Ans_list.append Ans_list append wa2 print(max(Ans_list)) print max(Ans_list) max Ans_list ex_list = [(pn[i]+1)/2 for i in range(len(pn))] [(pn[i]+1)/2 for i in range(len(pn))] ex_list n,k=map(int, input().split()) map(int, input().split()) n wa2 = ex_wa_list[k-1] ex_wa_list[k-1] wa2 pn = list(map(int, input().split())) list(map(int, input().split())) pn wa = 0 0 wa wa2 = 0 0 wa2 wa += ex_list[i] ex_list[i] wa ex_wa_list = [] [] ex_wa_list wa2 = ex_wa_list[k-1+i] - ex_wa_list[i-1] ex_wa_list[k-1+i] - ex_wa_list[i-1] wa2 k=map(int, input().split()) map(int, input().split()) k Ans_list = [] [] Ans_list
n,k=map(int, input().split())
pn = list(map(int, input().split()))
ex_list = [(pn[i]+1)/2 for i in range(len(pn))]
ex_wa_list = []
wa = 0
for i in range(len(ex_list)):
    wa += ex_list[i]
    ex_wa_list.append(wa)
Ans_list = []
wa2 = 0
for i in range(n-k+1):
    if i == 0:
        wa2 = ex_wa_list[k-1]
    else:
        wa2 = ex_wa_list[k-1+i] - ex_wa_list[i-1]
    Ans_list.append(wa2)
print(max(Ans_list))