#include <iostream>
#include <cstring>
using namespace std;
int main()
{
string n;
while(cin>>n)
{
int sum=0;
for(int i=0;i<n.size();i++)
{
if((n[i]-'0')%2==0)
sum+=n[i]-'0';
}
cout<<sum<<endl<<endl;
}
return 0;
}
#include <cstring>
using namespace std;
int main()
{
string n;
while(cin>>n)
{
int sum=0;
for(int i=0;i<n.size();i++)
{
if((n[i]-'0')%2==0)
sum+=n[i]-'0';
}
cout<<sum<<endl<<endl;
}
return 0;
}