def main():
    n, k = map(int, input().split())
    p_lst = list(map(int, input().split()))
    lst = []

    for i in range(n):
        lst.append((p_lst[i] + 1) / 2)

    tmp_sum = sum(lst[:k])
    maximum = tmp_sum
    for i in range(n - k):
        tmp_sum -= lst[i]
        tmp_sum += lst[i + k]
        maximum = max(maximum, tmp_sum)

    print(maximum)


if __name__ == '__main__':
    main() def main():
    n, k = map(int, input().split())
    p_lst = list(map(int, input().split()))
    lst = []

    for i in range(n):
        lst.append((p_lst[i] + 1) / 2)

    tmp_sum = sum(lst[:k])
    maximum = tmp_sum
    for i in range(n - k):
        tmp_sum -= lst[i]
        tmp_sum += lst[i + k]
        maximum = max(maximum, tmp_sum)

    print(maximum) main n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k p_lst = list(map(int, input().split())) p_lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split lst = [] lst [] for i in range(n):
        lst.append((p_lst[i] + 1) / 2)

     i range(n) range n lst.append((p_lst[i] + 1) / 2) lst.append lst append (p_lst[i] + 1) / 2 p_lst[i] + 1 p_lst[i] p_lst i 1 2 tmp_sum = sum(lst[:k]) tmp_sum sum(lst[:k]) sum lst[:k] lst :k k maximum = tmp_sum maximum tmp_sum for i in range(n - k):
        tmp_sum -= lst[i]
        tmp_sum += lst[i + k]
        maximum = max(maximum, tmp_sum)

     i range(n - k) range n - k n k tmp_sum -= lst[i] tmp_sum lst[i] lst i tmp_sum += lst[i + k] tmp_sum lst[i + k] lst i + k i k maximum = max(maximum, tmp_sum) maximum max(maximum, tmp_sum) max maximum tmp_sum print(maximum) print maximum if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    n, k = map(int, input().split())
    p_lst = list(map(int, input().split()))
    lst = []

    for i in range(n):
        lst.append((p_lst[i] + 1) / 2)

    tmp_sum = sum(lst[:k])
    maximum = tmp_sum
    for i in range(n - k):
        tmp_sum -= lst[i]
        tmp_sum += lst[i + k]
        maximum = max(maximum, tmp_sum)

    print(maximum) def main():
    n, k = map(int, input().split())
    p_lst = list(map(int, input().split()))
    lst = []

    for i in range(n):
        lst.append((p_lst[i] + 1) / 2)

    tmp_sum = sum(lst[:k])
    maximum = tmp_sum
    for i in range(n - k):
        tmp_sum -= lst[i]
        tmp_sum += lst[i + k]
        maximum = max(maximum, tmp_sum)

    print(maximum) main
def main():
    n, k = map(int, input().split())
    p_lst = list(map(int, input().split()))
    lst = []

    for i in range(n):
        lst.append((p_lst[i] + 1) / 2)

    tmp_sum = sum(lst[:k])
    maximum = tmp_sum
    for i in range(n - k):
        tmp_sum -= lst[i]
        tmp_sum += lst[i + k]
        maximum = max(maximum, tmp_sum)

    print(maximum)


if __name__ == '__main__':
    main()