import java. util. Scanner; public class Main{ public static void main (String[] args){ Scanner scanner = new Scanner (System. in); int[] number = new int[2]; for (int j = 0; j < number. length; j ++){ number[j] = scanner. nextInt(); } long[] point = new long[number[0]]; for (int j = 0; j < number[0]; j ++){ point[j] = scanner. nextLong(); } int answer = 0; long x = 0; for (int j = 0; j <= number[0] - number[1]; j ++){ for (int k = 0; k < number[1]; k ++){ if (point[j + k] % 2 == 0){ answer = 1; } } if (answer == 1){ if (x != 0){ System. out. println (x); } answer = 0; x = 0; continue; } for (int k = 0; k < number[1]; k ++){ x += point[j + k]; } } if (x != 0){ System. out. println (x); } scanner. close(); } }