import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())
def NIJIGEN(H): return [list(input()) for i in range(H)]
N,M=MAP()
L=LIST()
maxa=-(10**10)
sums=sum(L[:M])
maxa=max(maxa,sums)
for i in range(N-M):
  sums=sums-L[i]+L[i+M]
  maxa=max(maxa,sums)
print((maxa+M)/2) import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 def input() : return sys.stdin.readline().strip() input def INT()   : return int(input()) INT def MAP()   : return map(int,input().split()) MAP def LIST()  : return list(MAP()) LIST list(input()) for i in range(H) for i in range(H) i range(H) range H for i in range(H) list(input()) list input() input def NIJIGEN(H): return [list(input()) for i in range(H)] NIJIGEN H H N,M=MAP() N MAP() MAP M L=LIST() L LIST() LIST maxa=-(10**10) maxa -(10**10) 10**10 10 10 sums=sum(L[:M]) sums sum(L[:M]) sum L[:M] L :M M maxa=max(maxa,sums) maxa max(maxa,sums) max maxa sums for i in range(N-M):
  sums=sums-L[i]+L[i+M]
  maxa=max(maxa,sums) i range(N-M) range N-M N M sums=sums-L[i]+L[i+M] sums sums-L[i]+L[i+M] sums-L[i] sums L[i] L i L[i+M] L i+M i M maxa=max(maxa,sums) maxa max(maxa,sums) max maxa sums print((maxa+M)/2) print (maxa+M)/2 maxa+M maxa M 2 maxa=max(maxa,sums) max(maxa,sums) maxa M=MAP() MAP() M def INT()   : return int(input()) def INT()   : return int(input()) INT maxa=-(10**10) -(10**10) maxa L=LIST() LIST() L def NIJIGEN(H): return [list(input()) for i in range(H)] def NIJIGEN(H): return [list(input()) for i in range(H)] NIJIGEN def input() : return sys.stdin.readline().strip() def input() : return sys.stdin.readline().strip() input maxa=max(maxa,sums) max(maxa,sums) maxa def MAP()   : return map(int,input().split()) def MAP()   : return map(int,input().split()) MAP sums=sum(L[:M]) sum(L[:M]) sums N,M=MAP() MAP() N def LIST()  : return list(MAP()) def LIST()  : return list(MAP()) LIST sums=sums-L[i]+L[i+M] sums-L[i]+L[i+M] sums
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())
def NIJIGEN(H): return [list(input()) for i in range(H)]
N,M=MAP()
L=LIST()
maxa=-(10**10)
sums=sum(L[:M])
maxa=max(maxa,sums)
for i in range(N-M):
  sums=sums-L[i]+L[i+M]
  maxa=max(maxa,sums)
print((maxa+M)/2)