func main() var n: int :: cui@inputInt() var m: int :: cui@inputInt() var a: []int :: #[n + 1]int for i(0, n - 1) do a[i] :: cui@inputInt() end for do a[n] :: 0 var ans: int :: 0 var sum: int :: 0 var cnt: int :: 0 for i(0, n) if(a[i] % 2 = 1) do sum :+ a[i] do cnt :+ 1 else if(cnt >= m) do cui@print("\{sum}\n") end if do sum :: 0 do cnt :: 0 end if end for end func