Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
for i in range(1, N-K+1):
  mx = max(mx, sum(p[i:i+K]))
  
ans = (mx+K) / 2
print(ans)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

max_num = max(sum(numbers[i:i+K]) for i in range(N+1-K))
    
answer = (max_num + K) / 2
print(answer)


Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

max_num = 0
for i in range(N+1-K):
  max_num = max(max_num, sum(numbers[i:i+K]))
    
answer = (max_num + K) / 2
print(answer)


Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

number_sum = []
for i in range(N+1-K):
  number_sum.append(sum(numbers[i:i+K]))
    
answer = (max(number_sum) + K) / 2
print(answer)


Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

number_sum = []
for i in range(N+1-K):
  number_sum.append(sum(numbers[i:i+K]))
    
answer = (max(number_sum) + K) / 2
print(answer)


Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

maxvalue = 0
for i in range(N+1-K):
  number_sum = list(sum(numbers[i:i+K]))
    
answer = (max(number_sum) + K) / 2
print(answer)


Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

maxvalue = 0
for i in range(N+1-K):
  number_sum = sum(numbers[i:i+K])
  if number_sum > maxvalue:
    maxvalue = number_sum
    
answer = (maxvalue + K) / 2
print(answer)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

maxvalue = 0
for i in range(N-K):
  number_sum = sum(numbers[i:i+K-1]
  if number_sum > maxvalue:
    maxvalue = number_sum
    
print(maxvalue)


Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

maxvalue = 0
for i in range(N-K):
  number_sum = sum(number[i:i+K-1]
  if number_sum > maxvalue:
    maxvalue = number_sum
    
print(maxvalue)


Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)