#include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(NULL);
ios_base::sync_with_stdio(false);

int n, br1 = 0, br2 = 0;
cin>>n;
int num[n];
for(int i = 0; i < n; i++){
    cin>>num[i];
}
int k = 1, m = 2, d, e, brd = 0, bre = 0, brd2 = 0, bre2 = 0;
for(int i = 0; i < n; i++){
if(num[i] % 2 == 1){
    d = num[i];
    brd++;
}
if(num[i] % 2 == 0){
    e = num[i];
    bre++;
}
}

for(int i = 1; i < d; i = i + 2){
brd2++;
}
brd2 = brd2 - brd;
for(int i = 2; i < e; i = i + 2){
bre2++;
}
bre2 = bre2 - bre;

cout<<brd2 + 1<<' '<<bre2 + 1;
}
