nk = input().split()
n = int(nk[0])
k = int(nk[1])
p_s = input().split()
p = [int(s) for s in p_s]
max_val = 0
for i in range(0,k):
    max_val+=p[i]
tmp = max_val
for i in range(k,len(p)):
    tmp = tmp - p[i-k] + p[i]
    if tmp > max_val:
        max_val=tmp
print(max_val/2 + 0.5 * k) nk = input().split() nk input().split() ().split () input split n = int(nk[0]) n int(nk[0]) int nk[0] nk 0 k = int(nk[1]) k int(nk[1]) int nk[1] nk 1 p_s = input().split() p_s input().split() ().split () input split int(s) for s in p_s for s in p_s s p_s for s in p_s int(s) int s p = [int(s) for s in p_s] p [int(s) for s in p_s] max_val = 0 max_val 0 for i in range(0,k):
    max_val+=p[i] i range(0,k) range 0 k max_val+=p[i] max_val p[i] p i tmp = max_val tmp max_val for i in range(k,len(p)):
    tmp = tmp - p[i-k] + p[i]
    if tmp > max_val:
        max_val=tmp i range(k,len(p)) range k len(p) len p tmp = tmp - p[i-k] + p[i] tmp tmp - p[i-k] + p[i] tmp - p[i-k] tmp p[i-k] p i-k i k p[i] p i if tmp > max_val:
        max_val=tmp tmp > max_val tmp max_val max_val=tmp max_val tmp print(max_val/2 + 0.5 * k) print max_val/2 + 0.5 * k max_val/2 max_val 2 0.5 * k 0.5 k max_val = 0 0 max_val tmp = tmp - p[i-k] + p[i] tmp - p[i-k] + p[i] tmp k = int(nk[1]) int(nk[1]) k max_val=tmp tmp max_val nk = input().split() input().split() nk n = int(nk[0]) int(nk[0]) n max_val+=p[i] p[i] max_val p_s = input().split() input().split() p_s p = [int(s) for s in p_s] [int(s) for s in p_s] p tmp = max_val max_val tmp
nk = input().split()
n = int(nk[0])
k = int(nk[1])
p_s = input().split()
p = [int(s) for s in p_s]
max_val = 0
for i in range(0,k):
    max_val+=p[i]
tmp = max_val
for i in range(k,len(p)):
    tmp = tmp - p[i-k] + p[i]
    if tmp > max_val:
        max_val=tmp
print(max_val/2 + 0.5 * k)