# Enter your code here. Read input from STDIN. Print output to STDOUT n,k = map(int,raw_input().split(' ')) c = k*2+1 costs = map(int,raw_input().split(' ')) naiveBest = [x+1 for x in range(0,n-1,c)] curSum = 0 for i in naiveBest: curSum += costs[i] print curSum