#include <bits/stdc++.h>
using namespace std;
long long a[10],i,n,t;
int main()
{
n=10;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++)
if (a[i]%2==0) cout<<a[i]<<" ";
cout<<endl;
t=0;
for (i=1; i<=n; i++)
if (a[i]%2!=0) t+=a[i];
cout<<t;
return 0;
}