Question
Odd Sum Pairs
You are given an array of KaTeX can only parse string typed expression integers. Your task is to count the number of pairs KaTeX can only parse string typed expression such that KaTeX can only parse string typed expression and the sum of the two elements is odd.
Input
The first line contains a single integer KaTeX can only parse string typed expression — the size of the array.
The second line contains KaTeX can only parse string typed expression integers, representing the elements of the array — KaTeX can only parse string typed expression.
Output
Print a single integer — the number of pairs KaTeX can only parse string typed expression such that KaTeX can only parse string typed expression and KaTeX can only parse string typed expression is odd.
Example
Input
5
1 2 3 4 5

Output
6

Explanation:

Valid pairs with odd sum:
(1, 2) → 1 + 2 = 3
(1, 4) → 1 + 4 = 5
(2, 3) → 2 + 3 = 5
(2, 5) → 2 + 5 = 7
(3, 4) → 3 + 4 = 7
(4, 5) → 4 + 5 = 9
Total = 6 pairs.

Online