def dice_expectation(p):
  return ((1 + p) * p / 2) * (1/p)

n, k = map(int, input().split())
pp = [0] * (n+1)
for i, p in enumerate(map(int, input().split())):
  pp[i+1] = pp[i] + dice_expectation(p)

max = -1
for i in range(k, n+1, 1):
  max = pp[i] - pp[i-k] if pp[i] - pp[i-k] > max else max

print(max) def dice_expectation(p):
  return ((1 + p) * p / 2) * (1/p) dice_expectation return ((1 + p) * p / 2) * (1/p) ((1 + p) * p / 2) * (1/p) (1 + p) * p / 2 (1 + p) * p 1 + p 1 p p 2 1/p 1 p p p n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k pp = [0] * (n+1) pp [0] * (n+1) [0] 0 n+1 n 1 for i, p in enumerate(map(int, input().split())):
  pp[i+1] = pp[i] + dice_expectation(p) i p enumerate(map(int, input().split())) enumerate map(int, input().split()) map int input().split() ().split () input split pp[i+1] = pp[i] + dice_expectation(p) pp[i+1] pp i+1 i 1 pp[i] + dice_expectation(p) pp[i] pp i dice_expectation(p) dice_expectation p max = -1 max -1 for i in range(k, n+1, 1):
  max = pp[i] - pp[i-k] if pp[i] - pp[i-k] > max else max i range(k, n+1, 1) range k n+1 n 1 1 max = pp[i] - pp[i-k] if pp[i] - pp[i-k] > max else max max pp[i] - pp[i-k] if pp[i] - pp[i-k] > max else max pp[i] - pp[i-k] > max pp[i] - pp[i-k] pp[i] pp i pp[i-k] pp i-k i k max pp[i] - pp[i-k] pp[i] pp i pp[i-k] pp i-k i k max print(max) print max def dice_expectation(p):
  return ((1 + p) * p / 2) * (1/p) def dice_expectation(p):
  return ((1 + p) * p / 2) * (1/p) dice_expectation max = pp[i] - pp[i-k] if pp[i] - pp[i-k] > max else max pp[i] - pp[i-k] if pp[i] - pp[i-k] > max else max max pp = [0] * (n+1) [0] * (n+1) pp k = map(int, input().split()) map(int, input().split()) k n, k = map(int, input().split()) map(int, input().split()) n max = -1 -1 max
def dice_expectation(p):
  return ((1 + p) * p / 2) * (1/p)

n, k = map(int, input().split())
pp = [0] * (n+1)
for i, p in enumerate(map(int, input().split())):
  pp[i+1] = pp[i] + dice_expectation(p)

max = -1
for i in range(k, n+1, 1):
  max = pp[i] - pp[i-k] if pp[i] - pp[i-k] > max else max

print(max)
