Buggy python submission (verdict: Runtime Error):
a = 0
ans = 0

for i in range(n):
    c = 0
    a += p[i]
    s.append(a)
    #print(s)
    if i <= k - 1:
        continue
    else:
        c = a - s[i - k]
        c += k
        #print(c)
        if c > ans:
            ans = c
        else:
            pass

print(ans / 2)

Fixed submission:
N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = input().split()
p = list(map(int, input().split()))

n, k = int(n), int(k)

s = []
a = 0
ans = 0

for i in range(n):
    c = 0
    a += p[i]
    s.append(a)
    
    if i <= 2:
        continue
    else:
        c = a - s[i - k + 1]
        c += k
        if c > ans:
            ans = c

print(ans / 2)


Fixed submission:
N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = input().split()
p = list(map(int, input().split()))

n, k = int(n), int(k)

s = []
a = 0
ans = 0

for i in range(n):
    c = 0
    a += p[i]
    s.append(a)
    
    if i <= 2:
        continue
    else:
        c = a - s[i - k]
        c += k
        if c > ans:
            ans = c

print(ans / 2)


Fixed submission:
N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)

Buggy python submission (verdict: Runtime Error):

n, k = input().split()
p = list(map(int, input().split()))

n, k = int(n), int(k)

s = []
a = 0
ans = 0

for i in range(n):
    c = 0
    a += p[i]
    s.append(a)
    
    if i <= 2:
        continue
    else:
        c = a - s[i - k]
        c += k
        if c > ans:
            ans = c

print(ans / 2)


Fixed submission:
N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)

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

n, k = int(n), int(k)

ans = 0

for i in range(n - k + 1):
    c = 0
    for j in range(k):
        c += p[i + j]
    c += k
    if c >= ans:
        ans = c


print(ans / 2)


Fixed submission:
N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = input().split()
p = list(map(float, input().split()))

n, k = int(n), int(k)

ans = 0

for i in range(n - k + 1):
    c = 0
    for j in range(k):
        c += p[i + j]
    c += k
    if c >= ans:
        ans = c


print(ans / 2)


Fixed submission:
N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = input().split()
p = list(map(float, input().split()))

n, k = int(n), int(k)

ans = 0

for i in range(n - k + 1):
    c = 0
    for j in range(k):
        c += p[i + j]
    c += k
    if c >= ans:
        ans = c


print(ans / 2)

Fixed submission:
N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = input().split()
p = list(map(float, input().split()))

n, k = int(n), int(k)

a = []

for i in range(n - k + 1):
    c = 0
    for j in range(k):
        c += p[i + j]
    a.append(c + k)

ans = max(a)

print(ans / 2)
    


Fixed submission:
N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)