#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,a,max_nechetno=0,max_chetno=0,nechetno=0,chetno=0;
cin>>n;
for(long long a=0;a<n;a++){
long long b[a];
cin>>b[a];
if(b[a]%2==0){
chetno++;
if(b[a]>max_chetno){
max_chetno=b[a];
}
}else{
if(b[a]%2==1){
nechetno++;
if(b[a]>max_nechetno){
max_nechetno=b[a];
}
}
}
}
cout<<(max_nechetno-1)/2+1-nechetno<<" "<<(max_chetno-2)/2+1-chetno<<endl;
return 0;
}