#K82272. Maximize Even Page Days
Maximize Even Page Days
Maximize Even Page Days
Polycarp loves reading and especially enjoys books with an even number of pages. Given a collection of books, each with a specified number of pages, your task is to determine the maximum number of days Polycarp can spend reading. Each day, he reads one book, but only if the book has an even number of pages.
Formally, you are given an integer \(n\) representing the number of books and a list of \(n\) integers \(a_1, a_2, \dots, a_n\) where each \(a_i\) denotes the number of pages in the \(i\)-th book. Your goal is to compute and output the number of books with an even number of pages.
inputFormat
The input consists of two lines:
- The first line contains a single integer \(n\) \( (0 \le n \le 10^5)\), representing the number of books.
- The second line contains \(n\) space-separated integers \(a_1, a_2, \dots, a_n\), where each \(a_i\) \( (1 \le a_i \le 10^9)\) represents the number of pages in a book.
outputFormat
Output a single integer representing the maximum number of days Polycarp can spend reading books with an even number of pages.
## sample5
2 4 7 9 12
3