int main()
{
int randuri, coloane, matrice[10][10], suma = 0;
cin >> randuri >> coloane;
for(int index_rand = 0; index_rand < randuri; index_rand++)
for(int index_coloana = 0; index_coloana < randuri; index_coloana++)
{
cin >> matrice[index_rand][index_coloana];
if(matrice[index_rand][index_coloana] % 2 == 0)
suma += matrice[index_rand][index_coloana];
}
cout << suma;
return 0;
}