#include<iostream>
using namespace std;
int main ()
{
int n,br=1,chislo,a=0,b=0,br_nech=0,br_chet=0,nechet=1,chet=2;
cin>>n>>chislo;
while(n>br){
if(chislo%2==1){
a=chislo;
while(a>nechet){
br_nech++;
nechet=nechet+2;
}
}
cin>>chislo;
nechet=nechet+2;
br++;
}
cin>>chislo;
while(n>br){
if(chislo%2==0){
b=chislo;
while(b>chet){
br_chet=br_chet+1;
chet=chet+2;
}
}
cin>>chislo;
chet=chet+2;
br++;
}
cout<<br_nech<<' '<<br_chet<<endl;
return 0;
}
