func main() var ss: [][]char do ss :: cui@input().split(" ") var N: int :: ss[0].toInt(&) var M: int :: ss[1].toInt(&) do ss :: cui@input().split(" ") var sum: int var count: int for i(0, N - 1) var A: int :: ss[i].toInt(&) if(A % 2 = 1) do count :+ 1 do sum :+ A else if(count >= M) do cui@print("\{sum}\n") end if do count :: 0 do sum :: 0 end if end for if(count >= M) do cui@print("\{sum}\n") end if end func