#include <iostream>
#include <algorithm>
#include <fstream>

using namespace std;

int main()
{
    int n;
    cin >> n ;
    int temp;
    int largest = 0;
    int Count = 0;
    int A[100005] = {0};
    for (int i=0;i<n;i++){
        cin >> temp;
        largest=max(largest,temp);
        A[temp]=1;
    }
    for (int i=0;i<largest+1;i++)
        if (A[i])
            Count++;

    if (Count%2==0)
        Count--;
    cout << Count;
    return 0;
}
