#C9538. Sum of Squares for Even Numbers

    ID: 53642 Type: Default 1000ms 256MiB

Sum of Squares for Even Numbers

Sum of Squares for Even Numbers

You are given a list of positive integers. Your task is to compute the sum of the squares of even numbers from the list. Formally, if the list is \(a_1, a_2, \dots, a_n\), you need to calculate:

\[ S = \sum_{i=1}^{n} \begin{cases} a_i^2, & \text{if } a_i \text{ is even} \\ 0, & \text{otherwise} \end{cases} \]

If there is no even number in the list, the output should be 0.

inputFormat

The input consists of two lines. The first line contains an integer \(n\) representing the number of elements. The second line contains \(n\) space-separated positive integers.

outputFormat

Print a single integer representing the sum of the squares of all even numbers from the provided list.

## sample
5
1 2 3 4 5
20