N,K = map(int,input().split())
P = list(map(int,input().split()))
T = [0]*N

for i in range(N):
    P[i] = (1 + P[i])/2

if N == K:
    print(sum(P))

else:
    for i in range(1,N):
        P[i] += P[i-1]

    for i in range(K,N):
        T[i] = P[i] - P[i-K]

    T = T[K:]

    print(max(T)) N,K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K P = list(map(int,input().split())) P list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split T = [0]*N T [0]*N [0] 0 N for i in range(N):
    P[i] = (1 + P[i])/2 i range(N) range N P[i] = (1 + P[i])/2 P[i] P i (1 + P[i])/2 1 + P[i] 1 P[i] P i 2 if N == K:
    print(sum(P))

else:
    for i in range(1,N):
        P[i] += P[i-1]

    for i in range(K,N):
        T[i] = P[i] - P[i-K]

    T = T[K:]

    print(max(T)) N == K N K print(sum(P)) print sum(P) sum P for i in range(1,N):
        P[i] += P[i-1]

     i range(1,N) range 1 N P[i] += P[i-1] P[i] P i P[i-1] P i-1 i 1 for i in range(K,N):
        T[i] = P[i] - P[i-K]

     i range(K,N) range K N T[i] = P[i] - P[i-K] T[i] T i P[i] - P[i-K] P[i] P i P[i-K] P i-K i K T = T[K:] T T[K:] T K: K print(max(T)) print max(T) max T K = map(int,input().split()) map(int,input().split()) K T = [0]*N [0]*N T P = list(map(int,input().split())) list(map(int,input().split())) P T = T[K:] T[K:] T N,K = map(int,input().split()) map(int,input().split()) N
N,K = map(int,input().split())
P = list(map(int,input().split()))
T = [0]*N

for i in range(N):
    P[i] = (1 + P[i])/2

if N == K:
    print(sum(P))

else:
    for i in range(1,N):
        P[i] += P[i-1]

    for i in range(K,N):
        T[i] = P[i] - P[i-K]

    T = T[K:]

    print(max(T))