#include <bits/stdc++.h>
using namespace std;
int n,A[100],i,dem=0;
int main()
{
cin>>n;
for (int i=1; i<=n; i++) cin>>A[i];
sort(A+1,A+n+1);
for (int i=1; i<=n; i++)
cout<<A[i]<<" ";
cout<<endl;
for (int i=1; i<=n; i++)
if (A[i]%2==0) dem++;
cout<<dem;
}