#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools, bisect
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def S(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]

alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007

def main():
    N, K = LI()
    P = LI()

    cum = 0
    for i in range(K):
        cum += (P[i] + 1) / 2

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

if __name__ == '__main__':
    main() from collections import defaultdict, deque, Counter, OrderedDict from bisect import bisect_left, bisect_right from functools import reduce, lru_cache from heapq import heappush, heappop, heapify import itertools, bisect itertools bisect import math, fractions math fractions import sys, copy sys copy def L(): return sys.stdin.readline().split() L def I(): return int(sys.stdin.readline().rstrip()) I def S(): return list(sys.stdin.readline().rstrip()) S int(x) for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() int(x) int x def LI(): return [int(x) for x in sys.stdin.readline().split()] LI int(x) - 1 for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() int(x) - 1 int(x) int x 1 def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()] LI1 list(x) for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() list(x) list x def LS(): return [list(x) for x in sys.stdin.readline().split()] LS I() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) I() I def IR(n): return [I() for _ in range(n)] IR n n LI() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) LI() LI def LIR(n): return [LI() for _ in range(n)] LIR n n LI1() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) LI1() LI1 def LIR1(n): return [LI1() for _ in range(n)] LIR1 n n S() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) S() S def SR(n): return [S() for _ in range(n)] SR n n LS() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) LS() LS def LSR(n): return [LS() for _ in range(n)] LSR n n L() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) L() L def LR(n): return [L() for _ in range(n)] LR n n alphabets = "abcdefghijklmnopqrstuvwxyz" alphabets "abcdefghijklmnopqrstuvwxyz" ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ALPHABETS "ABCDEFGHIJKLMNOPQRSTUVWXYZ" sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 dire = [[1, 0], [0, 1], [-1, 0], [0, -1]] dire [[1, 0], [0, 1], [-1, 0], [0, -1]] [1, 0] 1 0 [0, 1] 0 1 [-1, 0] -1 0 [0, -1] 0 -1 dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]] dire8 [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]] [1, 0] 1 0 [1, 1] 1 1 [0, 1] 0 1 [-1, 1] -1 1 [-1, 0] -1 0 [-1, -1] -1 -1 [0, -1] 0 -1 [1, -1] 1 -1 MOD = 1000000007 MOD 1000000007 def main():
    N, K = LI()
    P = LI()

    cum = 0
    for i in range(K):
        cum += (P[i] + 1) / 2

    ans = cum
    for i in range(N - K):
        cum += (P[i + K] + 1) / 2 - (P[i] + 1) / 2
        ans = max(ans, cum)
    print(ans) main N, K = LI() N LI() LI K P = LI() P LI() LI cum = 0 cum 0 for i in range(K):
        cum += (P[i] + 1) / 2

     i range(K) range K cum += (P[i] + 1) / 2 cum (P[i] + 1) / 2 P[i] + 1 P[i] P i 1 2 ans = cum ans cum for i in range(N - K):
        cum += (P[i + K] + 1) / 2 - (P[i] + 1) / 2
        ans = max(ans, cum)
     i range(N - K) range N - K N K cum += (P[i + K] + 1) / 2 - (P[i] + 1) / 2 cum (P[i + K] + 1) / 2 - (P[i] + 1) / 2 (P[i + K] + 1) / 2 P[i + K] + 1 P[i + K] P i + K i K 1 2 (P[i] + 1) / 2 P[i] + 1 P[i] P i 1 2 ans = max(ans, cum) ans max(ans, cum) max ans cum print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def L(): return sys.stdin.readline().split() def L(): return sys.stdin.readline().split() L def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI(): return [int(x) for x in sys.stdin.readline().split()] LI def main():
    N, K = LI()
    P = LI()

    cum = 0
    for i in range(K):
        cum += (P[i] + 1) / 2

    ans = cum
    for i in range(N - K):
        cum += (P[i + K] + 1) / 2 - (P[i] + 1) / 2
        ans = max(ans, cum)
    print(ans) def main():
    N, K = LI()
    P = LI()

    cum = 0
    for i in range(K):
        cum += (P[i] + 1) / 2

    ans = cum
    for i in range(N - K):
        cum += (P[i + K] + 1) / 2 - (P[i] + 1) / 2
        ans = max(ans, cum)
    print(ans) main alphabets = "abcdefghijklmnopqrstuvwxyz" "abcdefghijklmnopqrstuvwxyz" alphabets def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()] def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()] LI1 def IR(n): return [I() for _ in range(n)] def IR(n): return [I() for _ in range(n)] IR def SR(n): return [S() for _ in range(n)] def SR(n): return [S() for _ in range(n)] SR dire = [[1, 0], [0, 1], [-1, 0], [0, -1]] [[1, 0], [0, 1], [-1, 0], [0, -1]] dire ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ALPHABETS def LSR(n): return [LS() for _ in range(n)] def LSR(n): return [LS() for _ in range(n)] LSR def LR(n): return [L() for _ in range(n)] def LR(n): return [L() for _ in range(n)] LR dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]] [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]] dire8 def S(): return list(sys.stdin.readline().rstrip()) def S(): return list(sys.stdin.readline().rstrip()) S def LS(): return [list(x) for x in sys.stdin.readline().split()] def LS(): return [list(x) for x in sys.stdin.readline().split()] LS def LIR1(n): return [LI1() for _ in range(n)] def LIR1(n): return [LI1() for _ in range(n)] LIR1 def LIR(n): return [LI() for _ in range(n)] def LIR(n): return [LI() for _ in range(n)] LIR def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I MOD = 1000000007 1000000007 MOD
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools, bisect
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def S(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]

alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007

def main():
    N, K = LI()
    P = LI()

    cum = 0
    for i in range(K):
        cum += (P[i] + 1) / 2

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

if __name__ == '__main__':
    main()