nn, kk = list(map(int,input().split()))
pp = list(map(int,input().split()))

expectation = [0]*(nn-kk+1)
expectation[0] = sum(pp[0:kk])

for i in range(1,nn-kk+1):
    expectation[i] = expectation[i-1] - pp[i-1] + pp[i+kk-1]

print((max(expectation)+kk)/2) nn, kk = list(map(int,input().split())) nn list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split kk pp = list(map(int,input().split())) pp list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split expectation = [0]*(nn-kk+1) expectation [0]*(nn-kk+1) [0] 0 nn-kk+1 nn-kk nn kk 1 expectation[0] = sum(pp[0:kk]) expectation[0] expectation 0 sum(pp[0:kk]) sum pp[0:kk] pp 0:kk 0 kk for i in range(1,nn-kk+1):
    expectation[i] = expectation[i-1] - pp[i-1] + pp[i+kk-1] i range(1,nn-kk+1) range 1 nn-kk+1 nn-kk nn kk 1 expectation[i] = expectation[i-1] - pp[i-1] + pp[i+kk-1] expectation[i] expectation i expectation[i-1] - pp[i-1] + pp[i+kk-1] expectation[i-1] - pp[i-1] expectation[i-1] expectation i-1 i 1 pp[i-1] pp i-1 i 1 pp[i+kk-1] pp i+kk-1 i+kk i kk 1 print((max(expectation)+kk)/2) print (max(expectation)+kk)/2 max(expectation)+kk max(expectation) max expectation kk 2 pp = list(map(int,input().split())) list(map(int,input().split())) pp nn, kk = list(map(int,input().split())) list(map(int,input().split())) nn expectation = [0]*(nn-kk+1) [0]*(nn-kk+1) expectation kk = list(map(int,input().split())) list(map(int,input().split())) kk
nn, kk = list(map(int,input().split()))
pp = list(map(int,input().split()))

expectation = [0]*(nn-kk+1)
expectation[0] = sum(pp[0:kk])

for i in range(1,nn-kk+1):
    expectation[i] = expectation[i-1] - pp[i-1] + pp[i+kk-1]

print((max(expectation)+kk)/2)
