SP20987 UCBINTI - Sequence

Description

We say that an integer sequence a $ _{1} $ , a $ _{2} $ , ... , a $ _{n} $ is k-even if the sum of any k consecutive terms of the sequnce is even. For a given sequence we would like to find out how many of its terms need to be changed so that the sequence becomes k-even.

Input Format

The first line of input contains two integers n and k (1 k n 10 $ ^{6} $ ). The second line contains a sequence composed of n integers a $ _{1} $ , a $ _{2} $ , ... , a $ _{n} $ . For each of the a $ _{i} $ 's it holds that 0 a $ _{i} $ 10 $ ^{9} $ .

Output Format

The only line of output should hold one integer: the minimum number of terms of the sequence that need to be changed so that it becomes k-even.