#include <stdio.h>
int sum_even_numbers(int *ptr, int n) {
int ans = 0;
for (int i = 0; i < n; i++) {
int val = *(ptr+i);
if (val%2 == 0) {
ans += val;
}
}
return ans;
}
int main() {
int n;
scanf("%d", &n);
int arr[100];
for (int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}
int result = sum_even_numbers(arr, n);
printf("Sum = %d", result);
return 0;
}