#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long nezardaskaniChisla, broiNezardaskaniChisla, zadraskaniNechetni = 0, zadraskaniChetni = 0, nechetni = 1, chetni = 2;
    cin>>broiNezardaskaniChisla; //6
        for(broiNezardaskaniChisla = broiNezardaskaniChisla; broiNezardaskaniChisla > 0; broiNezardaskaniChisla--) //6 = 6; 6 > 0; 6--
        {
            cin>>nezardaskaniChisla; //vkarai chisla
            if(nezardaskaniChisla % 2 == 1) //chetno li e????????????????????????????????????????????????????????????????????????? (banitsa)
            {
                while(nezardaskaniChisla >= nechetni) //vreme za proverki
                {
                    if(nezardaskaniChisla != nechetni) //proverki
                    {
                        zadraskaniNechetni++; //money money moneyyyyyyy
                    }
                    nechetni = nechetni + 2; //golqmo proverka!!!!!!!!!
                }
            }
            else
            {
                while(nezardaskaniChisla >= chetni)
                {
                    if(nezardaskaniChisla != chetni)
                    {
                        zadraskaniChetni++;
                    }
                    chetni = chetni + 2;
                }
            }
        }
    cout<<zadraskaniNechetni<<" "<<zadraskaniChetni;
    return 0;
}
