You are given an integer sequence a1,a2,…,an. For every integer i with 1≤i≤n−k+1, if the partial sum ai+ai+1+⋯+ai+k−1 is even, the sequence is called a k-even-sum sequence.
In other words, the sum of every contiguous block of length k must be even.
You may choose some elements of the sequence and change each of them to any integer you like. Find the minimum number of elements you must change to turn the sequence into a k-even-sum sequence.
The first line contains two integers n and k separated by a space. (1≤k≤n≤106)
The second line contains n integers separated by spaces; the i-th of them is ai. (0≤ai≤109)
Print the minimum number of elements that must be changed on a single line.