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

sum_k = sum( p[ : k ] )
max_sum_k = sum_k

for i in range( k, n ):
    sum_k += p[ i ] - p[ i - k ]
    if sum_k > max_sum_k:
        max_sum_k = sum_k

print( ( max_sum_k + k ) / 2 ) n, k = map( int, input().split() ) n map( int, input().split() ) map int input().split() ().split () input split k p = list( map( int, input().split() ) ) p list( map( int, input().split() ) ) list map( int, input().split() ) map int input().split() ().split () input split sum_k = sum( p[ : k ] ) sum_k sum( p[ : k ] ) sum p[ : k ] p : k k max_sum_k = sum_k max_sum_k sum_k for i in range( k, n ):
    sum_k += p[ i ] - p[ i - k ]
    if sum_k > max_sum_k:
        max_sum_k = sum_k i range( k, n ) range k n sum_k += p[ i ] - p[ i - k ] sum_k p[ i ] - p[ i - k ] p[ i ] p i p[ i - k ] p i - k i k if sum_k > max_sum_k:
        max_sum_k = sum_k sum_k > max_sum_k sum_k max_sum_k max_sum_k = sum_k max_sum_k sum_k print( ( max_sum_k + k ) / 2 ) print ( max_sum_k + k ) / 2 max_sum_k + k max_sum_k k 2 p = list( map( int, input().split() ) ) list( map( int, input().split() ) ) p sum_k += p[ i ] - p[ i - k ] p[ i ] - p[ i - k ] sum_k max_sum_k = sum_k sum_k max_sum_k k = map( int, input().split() ) map( int, input().split() ) k sum_k = sum( p[ : k ] ) sum( p[ : k ] ) sum_k max_sum_k = sum_k sum_k max_sum_k n, k = map( int, input().split() ) map( int, input().split() ) n
n, k = map( int, input().split() )
p = list( map( int, input().split() ) )

sum_k = sum( p[ : k ] )
max_sum_k = sum_k

for i in range( k, n ):
    sum_k += p[ i ] - p[ i - k ]
    if sum_k > max_sum_k:
        max_sum_k = sum_k

print( ( max_sum_k + k ) / 2 )