#C14399. Sum of Even Numbers Greater Than 30

    ID: 44043 Type: Default 1000ms 256MiB

Sum of Even Numbers Greater Than 30

Sum of Even Numbers Greater Than 30

Given a list of integers, your task is to compute the sum of all numbers that are both even and strictly greater than 30.

In mathematical terms, if the list is \( A = [a_1, a_2, \dots, a_n] \), you need to compute the sum:

\[ S = \sum_{\substack{i=1 \\ a_i \% 2 = 0 \\ a_i > 30}}^{n} a_i \]

This problem tests your ability to perform filtering and aggregation on sequences of numbers.

inputFormat

The input is given via standard input (stdin) and consists of two lines:

  • The first line contains an integer \( n \) (\( n \geq 0 \)) representing the number of integers.
  • The second line contains \( n \) space-separated integers.

outputFormat

Output a single integer to standard output (stdout) which is the sum of all numbers that are even and greater than 30.

## sample
3
44 55 66
110

</p>