def INT():
    return int(input())

def LI():
    return list(map(int, input().split()))

def MI():
    return map(int, input().split())

N, K = MI()
p = LI()

def E(x):
    return (x + 1) / 2

for i in range(N):
    p[i] = E(p[i])
    
ans = sum(p[:K])
E_K = ans

for i in range(N - K):
    E_K += p[i + K] - p[i]
    ans = max(ans, E_K)

print(ans) def INT():
    return int(input()) INT return int(input()) int(input()) int input() input def LI():
    return list(map(int, input().split())) LI return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def MI():
    return map(int, input().split()) MI return map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split N, K = MI() N MI() MI K p = LI() p LI() LI def E(x):
    return (x + 1) / 2 E return (x + 1) / 2 (x + 1) / 2 x + 1 x 1 2 x x for i in range(N):
    p[i] = E(p[i])
     i range(N) range N p[i] = E(p[i]) p[i] p i E(p[i]) E p[i] p i ans = sum(p[:K]) ans sum(p[:K]) sum p[:K] p :K K E_K = ans E_K ans for i in range(N - K):
    E_K += p[i + K] - p[i]
    ans = max(ans, E_K) i range(N - K) range N - K N K E_K += p[i + K] - p[i] E_K p[i + K] - p[i] p[i + K] p i + K i K p[i] p i ans = max(ans, E_K) ans max(ans, E_K) max ans E_K print(ans) print ans E_K = ans ans E_K def INT():
    return int(input()) def INT():
    return int(input()) INT def E(x):
    return (x + 1) / 2 def E(x):
    return (x + 1) / 2 E E_K += p[i + K] - p[i] p[i + K] - p[i] E_K p = LI() LI() p def LI():
    return list(map(int, input().split())) def LI():
    return list(map(int, input().split())) LI def MI():
    return map(int, input().split()) def MI():
    return map(int, input().split()) MI K = MI() MI() K N, K = MI() MI() N ans = sum(p[:K]) sum(p[:K]) ans ans = max(ans, E_K) max(ans, E_K) ans
def INT():
    return int(input())

def LI():
    return list(map(int, input().split()))

def MI():
    return map(int, input().split())

N, K = MI()
p = LI()

def E(x):
    return (x + 1) / 2

for i in range(N):
    p[i] = E(p[i])
    
ans = sum(p[:K])
E_K = ans

for i in range(N - K):
    E_K += p[i + K] - p[i]
    ans = max(ans, E_K)

print(ans)