stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <iostream>

#include <cmath>

using namespace std;



int main() {

    string arr[100],arr2[200][100];

    int h,w; cin>>h>>w;

    for (int i = 0; i < h; i++){

        cin>>arr[i];

    }

    for (int i = 0; i < h; i++){

        cout<<arr[i]<<endl;

        cout<<arr[i]<<endl;

    }

}

// Optimized solution to the same problem (faster):
                #include <bits/stdc++.h>

                using namespace std;

                typedef long long ll;

                #define INPUT()              freopen("input.txt", "r", stdin)

                #define OUTPUT()             freopen("output.txt", "w", stdout)

                #define F                    first

                #define S                    second

            //Templatefunctions

                template<typename T>T gcd(T x, T y) { if (y == 0)return x; else return gcd(y, x%y);}

                template <class T> T euclideanDistance(T x1 , T x2 , T y1 , T y2){return sqrt(( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ));}

                template <class T> T digitSum(T n){T sum = 0;while(n > 0)sum += n % 10,n /= 10;return sum;}

            //datatypes

                typedef long long int ll;

                typedef unsigned long long int ull;

                typedef long double ld;

            //constants

                const double INF = 1e+9;

                const double INFLL = 1e+18;

                const double EPS = 1e-9;

                const double PI = acos(-1);

                const int knightDir[8][2] = {{-2,-1},{-2,1},{-1,2},{1,2},{2,-1},{2,1},{-1,-2},{1,-2}};

                       //const int dx[]={0,0,0,1,1,1,-1,-1,-1};

                       //const int dy[]={-1,0,1,-1,0,1,-1,0,1};

                const int dx[] = {0 , 1 , 0 , -1};

                const int dy[] = {1 , 0 , -1 , 0};

            //helpers

                //#define MOD         1000000007LL

                #define MAX         1000005

                const ll MOD = 998244353;

                int arr[MAX];

            //Global Variables







                int main()

                {

                        int x , y;

                        scanf("%d%d",&x,&y);



                        string arr[x];



                        for(int i = 0 ; i < x ; i++)

                        {

                            cin>>arr[i];

                            //cout<<arr[i]<<"\n"<<arr[i]<<"\n";

                        }

                        for(int i = 0 ; i < x ; i++)

                        {

                            //cin>>arr[i];

                            cout<<arr[i]<<"\n"<<arr[i]<<"\n";

                        }

                }


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

const int N=65;

const double eps=1e-8;

int n,k;

double x[N],y[N],c[N],r[N];

double dis(pair<double,double> a,pair<double,double> b) {

    return sqrt((a.first-b.first)*(a.first-b.first)+(a.second-b.second)*(a.second-b.second));

}

vector<pair<double,double> > cal(double x1,double y1,double r1,double x2,double y2,double r2) {//两圆交点

    x1-=x2,y1-=y2;

    double S=x1*x1+y1*y1,a=(S+r2*r2-r1*r1)/2,D=S*r2*r2-a*a;

    if(S==0)return {};

    if(D<0) return {};

    double A1=a*x1,B1=y1*sqrt(D);

    double A2=a*y1,B2=x1*sqrt(D);

    return {{(A1+B1)/S+x2,(A2-B2)/S+y2},{(A1-B1)/S+x2,(A2+B2)/S+y2}};

}

bool check(double t) {

    for(int i=0;i<n;i++) r[i]=t/c[i];

    vector<pair<double,double> > vec;

    for(int i=0;i<n;i++) {

    	vec.push_back({x[i],y[i]});

        for(int j=i+1;j<n;j++) {

            auto v=cal(x[i],y[i],r[i],x[j],y[j],r[j]);

            for(auto it:v) vec.push_back(it);

        }

    }

    for(auto it:vec) {

        int cnt=0;

        for(int i=0;i<n;i++) {

            if(r[i]+eps>=dis(it,{x[i],y[i]})) cnt++;

        }

        if(cnt>=k) return true;

    }

    return false;

}

int main() {

    scanf("%d%d",&n,&k);

    for(int i=0;i<n;i++) {

        scanf("%lf%lf%lf",&x[i],&y[i],&c[i]);

    }

    double L=0,R=1000010;

    for(int i=0;i<100;i++) {

        double mid=(L+R)/2;

        if(check(mid)) R=mid;

        else L=mid;

    }

    printf("%.6lf\n",R);

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <math.h>

#define maxn 65

#define eps 1e-8

double x[maxn],y[maxn],c[maxn],X[65*65*2],Y[65*65*2],r[maxn];

int tot,N,K;

double dis(double x,double y,double c,double X,double Y){

	return c*sqrt((X-x)*(X-x)+(Y-y)*(Y-y));

}

void cal(double x1,double y1,double r1,double x2,double y2,double r2){//计算两圆交点坐标

	double D;//A=a*a,H=h*h,D=d*d;

	double ad,h;//ad=a*d;

	D=(x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);

	if(D==0)return;

	ad=(r1*r1+D-r2*r2)/2;//2*a*d=r1*r1+D-r2*r2

	h=D*r1*r1-ad*ad;

	if(h<0)return;//漏了此句的判定

	h=sqrt(h);

	tot++,X[tot]=x1+ad*(x2-x1)/D-(y2-y1)*h/D,Y[tot]=y1+ad*(y2-y1)/D+(x2-x1)*h/D;

	tot++,X[tot]=x1+ad*(x2-x1)/D+(y2-y1)*h/D,Y[tot]=y1+ad*(y2-y1)/D-(x2-x1)*h/D;

}

int judge(double t){

	int i,j,cnt;

	for(i=1;i<=N;i++)r[i]=t/c[i];

	tot=0;

	for(i=1;i<=N;i++){

		tot++,X[tot]=x[i],Y[tot]=y[i];//tot++,X[i]=x[i],Y[i]=y[i];

		for(j=i+1;j<=N;j++)

			cal(x[i],y[i],r[i],x[j],y[j],r[j]);

	}

	for(i=1;i<=tot;i++){

		cnt=0;

		for(j=1;j<=N;j++)

			if(dis(x[j],y[j],c[j],X[i],Y[i])<t+eps)cnt++;//浮点比大小无等于的情况，这是由浮点误差决定的。

		if(cnt>=K)return 1;

	}

	return 0;

}

int main(){

	double l,r,mid;

	int i;

	scanf("%d%d",&N,&K);

	for(i=1;i<=N;i++)scanf("%lf%lf%lf",&x[i],&y[i],&c[i]);

	l=0,r=1000010;

	while(l+eps<r){

		mid=(l+r)/2;

		if(judge(mid))r=mid;

		else l=mid;

	}

	printf("%.6lf\n",r);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <vector>

#include <string>

#include <algorithm>

#include <utility>

using namespace std;

//変数デバッグ

#define DEB(variable) cout << #variable << '=' << variable << endl



//for簡易表記(引数ミス防止)

#define FOR(LoopVariable,numberOFbegin,numberOFend) for (int LoopVariable = (numberOFbegin); (LoopVariable) < (numberOFend); (LoopVariable)++)

#define REP(LoopVariable,numberOFend) for(int LoopVariable = 0;(LoopVariable)<(numberOFend);LoopVariable++)





int main(){



    int n,a,b;

    cin >> n >> a >> b;

    if((b-a)%2){

        cout << "Borys" << endl;

    }else{

        cout << "Alice" << endl;

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



#define endl '\n'



int main()

{

    int n, a, b;

    scanf("%d %d %d", &n, &a, &b);



    a-=b;

    a&1? printf("Borys"): printf("Alice");



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

using namespace std;



int main() {

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.tie(NULL);

    

    int N, A, B;

    cin >> N >> A >> B;



    int diff = B - A;



    // CHECK FOR SPECIAL CASE WHEN A IS NEXT TO B

    if(diff == 0 && (A==1 || B==N)) {

        if(A==1) cout << "Borys" << endl;

    }

    else {

        // CHECK PARITY: ALICE WINS IF EVEN

        if(diff%2 == 0) cout << "Alice" << endl;

        else cout << "Borys" << endl;

    }

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



#define endl '\n'



int main()

{

    int n, a, b;

    scanf("%d %d %d", &n, &a, &b);



    a-=b;

    a&1? printf("Borys"): printf("Alice");



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int n, a, b;



int main() {

    scanf("%d%d%d", &n, &a, &b);

    if((b - a) % 2 == 0) printf("Alice\n");

    else printf("Borys\n");

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <math.h>

int main ()

{

    int n, a, b;

    scanf ("%d %d %d", &n, &a, &b);

    if ((a+b)%2==0) printf ("Alice");

    else printf ("Borys");

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <algorithm>

#include <climits>

#include <cmath>

#include <iomanip>

#include <iostream>

#include <list>

#include <map>

#include <set>

#include <sstream>

#include <string>

#include <vector>



#define endl '\n'

#define ull unsigned long long

#define ll long long

#define ul unsigned long

#define ld long double

#define PI 3.14159265359



using namespace std;



int main() {

	ios_base::sync_with_stdio(false);

	cin.tie(nullptr);

	cout.tie(nullptr);

	int t = 1;

	// cin >> t;

	while (t--) {

		int n, a, b;

		cin >> n >> a >> b;

		cout << ((b - a) & 1 ? "Borys" : "Alice");

	}

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <math.h>

int main ()

{

    int n, a, b;

    scanf ("%d %d %d", &n, &a, &b);

    if ((a+b)%2==0) printf ("Alice");

    else printf ("Borys");

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int main()

{

    int n, a, b;

    cin >> n >> a >> b;

    int d = b-a;

    

    if(d%2) cout << "Borys" << endl;

    else cout << "Alice" << endl;



    return 0; 

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <math.h>

int main ()

{

    int n, a, b;

    scanf ("%d %d %d", &n, &a, &b);

    if ((a+b)%2==0) printf ("Alice");

    else printf ("Borys");

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int N, A, B; cin >> N >> A >> B;

    cout << ((B - A) % 2 ? "Borys" : "Alice") << endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int a,b;



int main(void){

    scanf("%*d%d%d",&a,&b);

    if((b-a-1)&1)

        puts("Alice");

    else

        puts("Borys");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<cstring>

#include<set>

#include<vector>

#include<queue>

#include<cmath>

#include<memory.h>

#include<ctime>

#include<cstdio>

#include<map>

#include<stack>



using namespace std;



int main()

{

	int n,a,b;

	cin>>n>>a>>b;

	if((b-a)%2==0)

	{

		cout<<"Alice"<<endl;

	}

	else

	{

		cout<<"Borys"<<endl;

	}

	return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>



int a,b;



int main(void){

    scanf("%*d%d%d",&a,&b);

    if((b-a-1)&1)

        puts("Alice");

    else

        puts("Borys");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <map>

#include <cstdio>



using std::map;



int n, m, x, m1, m2;



map <int, int> p;



int main() {

	scanf("%d", &n);

	for(int i = 0;i < n;i ++) {

		scanf("%d", &x);

		p[x] = 1;

	}

	m = p.size();

	

	for(map<int, int>::iterator iter1 = p.begin();iter1 != p.end();iter1 ++)

		m1 ++;

	for(auto iter2 : p) 

		m2 ++;

	if(m1 != m || m2 != m)

		puts("ERROR");

	

	m -= !(m & 1);

	printf("%d", m);

	return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

int cnt[100001];

int arr[100001];

bool left(int index)

{

    for (int i=0;i<index;i++)

    {

        if (cnt[arr[i]]>1)

        {

            return true;

        }

    }

    return false;

}

void show(int index)

{

    printf("Arr: ");

    for (int i=0;i<index;i++)

    {

        printf("%d ",arr[i]);

    }

    printf("\n");

    printf("Cnt: ");

    for (int i=0;i<index;i++)

    {

        printf("%d ",cnt[arr[i]]);

    }

    printf("\n");

}

main()

{

    int n,index=0;

    scanf("%d",&n);

    for (int i=0;i<n;i++)

    {

        int input;

        scanf("%d",&input);

        if (cnt[input]==0)

        {

            arr[index]=input;

            index++;

        }

        cnt[input]++;

    }

    //show(index);

    while (left(index)==true)

    {

        for (int i=0;i<index;i++)

        {

            if (cnt[arr[i]]>1)

            {

                cnt[arr[i]]--;

                int mx=-999;

                int keepj;

                for (int j=0;j<index;j++)

                {

                    if (cnt[arr[j]]>mx)

                    {

                        mx = cnt[arr[j]];

                        keepj = j;

                    }

                }

                cnt[arr[keepj]]--;

            }

        }

        //show(index);

    }

    int ans=0;

    for (int i=0;i<index;i++)

    {

        ans+=cnt[arr[i]];

    }

    printf("%d",ans);



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<stdio.h>

#include<queue>

#include<map>

using namespace std;

main()

{

    int num,b;

    queue<int> q;

    map<int,int> m;

    scanf("%d",&num);

    for(int i=0;i<num;i++)

    {

        scanf("%d",&b);

        m[b]++;

    }

    if(m.size()%2==0) printf("%d\n",m.size()-1);

    else printf("%d\n",m.size());

}


// Optimized solution to the same problem (faster):
#include <stdio.h>

int cnt[100001];

int arr[100001];

bool left(int index)

{

    for (int i=0;i<index;i++)

    {

        if (cnt[arr[i]]>1)

        {

            return true;

        }

    }

    return false;

}

void show(int index)

{

    printf("Arr: ");

    for (int i=0;i<index;i++)

    {

        printf("%d ",arr[i]);

    }

    printf("\n");

    printf("Cnt: ");

    for (int i=0;i<index;i++)

    {

        printf("%d ",cnt[arr[i]]);

    }

    printf("\n");

}

main()

{

    int n,index=0;

    scanf("%d",&n);

    for (int i=0;i<n;i++)

    {

        int input;

        scanf("%d",&input);

        if (cnt[input]==0)

        {

            arr[index]=input;

            index++;

        }

        cnt[input]++;

    }

    //show(index);

    while (left(index)==true)

    {

        for (int i=0;i<index;i++)

        {

            if (cnt[arr[i]]>1)

            {

                cnt[arr[i]]--;

                int mx=-999;

                int keepj;

                for (int j=0;j<index;j++)

                {

                    if (cnt[arr[j]]>mx)

                    {

                        mx = cnt[arr[j]];

                        keepj = j;

                    }

                }

                cnt[arr[keepj]]--;

            }

        }

        //show(index);

    }

    int ans=0;

    for (int i=0;i<index;i++)

    {

        ans+=cnt[arr[i]];

    }

    printf("%d",ans);



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

main()

{

    long n,g,i,j;

    map<long,long> a;

    scanf("%ld",&n);

    for(i=1;i<=n;i++)

    {

        scanf(" %ld",&g);

        a[g]++;

    }

    printf("%ld",a.size()-(a.size()+1)%2);

}


// Optimized solution to the same problem (faster):
#include <stdio.h>

int cnt[100001];

int arr[100001];

bool left(int index)

{

    for (int i=0;i<index;i++)

    {

        if (cnt[arr[i]]>1)

        {

            return true;

        }

    }

    return false;

}

void show(int index)

{

    printf("Arr: ");

    for (int i=0;i<index;i++)

    {

        printf("%d ",arr[i]);

    }

    printf("\n");

    printf("Cnt: ");

    for (int i=0;i<index;i++)

    {

        printf("%d ",cnt[arr[i]]);

    }

    printf("\n");

}

main()

{

    int n,index=0;

    scanf("%d",&n);

    for (int i=0;i<n;i++)

    {

        int input;

        scanf("%d",&input);

        if (cnt[input]==0)

        {

            arr[index]=input;

            index++;

        }

        cnt[input]++;

    }

    //show(index);

    while (left(index)==true)

    {

        for (int i=0;i<index;i++)

        {

            if (cnt[arr[i]]>1)

            {

                cnt[arr[i]]--;

                int mx=-999;

                int keepj;

                for (int j=0;j<index;j++)

                {

                    if (cnt[arr[j]]>mx)

                    {

                        mx = cnt[arr[j]];

                        keepj = j;

                    }

                }

                cnt[arr[keepj]]--;

            }

        }

        //show(index);

    }

    int ans=0;

    for (int i=0;i<index;i++)

    {

        ans+=cnt[arr[i]];

    }

    printf("%d",ans);



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



int main(){

    int n;

    scanf("%d",&n);

    set<int> a;

    for(int i=0;i<n;i++){

        int t;

        scanf("%d",&t);

        a.insert(t);

    }

    int s=a.size();

    if(s%2==0) printf("%d\n",s-1);

    else printf("%d\n",s);

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>

int cnt[100001];

int arr[100001];

bool left(int index)

{

    for (int i=0;i<index;i++)

    {

        if (cnt[arr[i]]>1)

        {

            return true;

        }

    }

    return false;

}

void show(int index)

{

    printf("Arr: ");

    for (int i=0;i<index;i++)

    {

        printf("%d ",arr[i]);

    }

    printf("\n");

    printf("Cnt: ");

    for (int i=0;i<index;i++)

    {

        printf("%d ",cnt[arr[i]]);

    }

    printf("\n");

}

main()

{

    int n,index=0;

    scanf("%d",&n);

    for (int i=0;i<n;i++)

    {

        int input;

        scanf("%d",&input);

        if (cnt[input]==0)

        {

            arr[index]=input;

            index++;

        }

        cnt[input]++;

    }

    //show(index);

    while (left(index)==true)

    {

        for (int i=0;i<index;i++)

        {

            if (cnt[arr[i]]>1)

            {

                cnt[arr[i]]--;

                int mx=-999;

                int keepj;

                for (int j=0;j<index;j++)

                {

                    if (cnt[arr[j]]>mx)

                    {

                        mx = cnt[arr[j]];

                        keepj = j;

                    }

                }

                cnt[arr[keepj]]--;

            }

        }

        //show(index);

    }

    int ans=0;

    for (int i=0;i<index;i++)

    {

        ans+=cnt[arr[i]];

    }

    printf("%d",ans);



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n;

    int a[200000];

    cin>>n;

    for(int i=0;i<n;i++)

    {

        cin>>a[i];

    }

    sort(a,a+n);

    int x=unique(a,a+n)-a;

    if(x%2)

    {

        cout<<x;

    }

    else

    {

        cout<<x-1;

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

int n;

bool a[100010];

signed main()

{

	scanf("%d",&n);int t,ans(0);bool f(0);

	while(n--)

		scanf("%d",&t),!a[t]?a[t]=1,ans++:f=!f;

	return printf("%d\n",ans-f),0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
 ///IN THE NAME OF ALLAH

 #include <bits/stdc++.h>

 using namespace std;

 map<int,int>mp;

 int main() {

  int n;

  scanf("%d",&n);

  for(int i=0;i<n;i++){

   int a;

   scanf("%d",&a);

   mp[a]=1;

  }

  if(mp.size()%2==0)

    cout<<mp.size()-1;

  else cout<<mp.size();

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <string>

#include <cmath>

#include <algorithm>

#include <vector>

#include <map>

#include <queue>

#include <set>

using namespace std;

typedef long long LL;

const int MaxN = 1e5;

const int Inf = 1 << 30;



int a[MaxN + 5];



int main()

{

	int n,p;

	while(~scanf("%d",&n)){

		for(int i = 1;i <= n;i++) scanf("%d",&a[i]);

		sort(a + 1,a + 1 + n);p = 0;

		for(int i = 2;i <= n;i++) if(a[i] == a[i - 1]) p++;

		p = p + (p % 2 == 0 ? 0 : 1);

		printf("%d\n",n - p);

	}

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    cin >> n;

    int a[n];

    for (int i = 0; i < n; i++) {

        cin >> a[i];

    }

    int ans = 0;

    sort (a , a + n);

    for (int i = 0; i < n; i ++) {

        if (a[i] != a[i + 1]) {

            ans++;

        }

    }

    if (ans % 2 == 0) {

        cout << ans - 1;

    }

    else {

    cout << ans << endl;

    }

    return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <string>

#include <cmath>

#include <algorithm>

#include <vector>

#include <map>

#include <queue>

#include <set>

using namespace std;

typedef long long LL;

const int MaxN = 1e5;

const int Inf = 1 << 30;



int a[MaxN + 5];



int main()

{

	int n,p;

	while(~scanf("%d",&n)){

		for(int i = 1;i <= n;i++) scanf("%d",&a[i]);

		sort(a + 1,a + 1 + n);p = 0;

		for(int i = 2;i <= n;i++) if(a[i] == a[i - 1]) p++;

		p = p + (p % 2 == 0 ? 0 : 1);

		printf("%d\n",n - p);

	}

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>



using namespace std;

using namespace __gnu_pbds;



#define fi first

#define se second

#define mp make_pair

#define pb push_back

#define fbo find_by_order

#define ook order_of_key



typedef long long ll;

typedef pair<ll,ll> ii;

typedef vector<int> vi;

typedef long double ld; 

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

typedef set<int>::iterator sit;

typedef map<int,int>::iterator mit;

typedef vector<int>::iterator vit;



deque<int> dq;

map<int,int> ma;

bool marked[100001];

void rem(int x)

{

	ma[x]--;

	if(ma[x]==0) ma.erase(x);

}



int main()

{

	ios_base::sync_with_stdio(0); cin.tie(0);

	int n; cin>>n;

	dq.resize(n);

	for(int i =0; i < n; i++) 

	{

		cin>>dq[i];

		ma[dq[i]]++;

	}

	int ans = ma.size();

	if(ans%2==0) ans--;

	cout<<ans<<'\n';

	return 0;

	while(!dq.empty())

	{

		cerr<<ma.size()<<' '<<dq.size()<<'\n';

		if(ma.size()==dq.size())

		{

			cout<<ma.size()<<'\n';

			return 0;

		}

		int a[3];

		a[0]=dq.front();

		dq.pop_front();

		a[1]=dq.front();

		dq.pop_front();

		a[2]=dq.front();

		dq.pop_front();

		cerr<<a[0]<<' '<<a[1]<<' '<<a[2]<<'\n';

		sort(a,a+3);

		//cerr<<a[0]<<' '<<a[1]<<' '<<a[2]<<'\n';

		rem(a[0]);

		rem(a[2]);

		rem(a[1]);

		if(!marked[a[1]])

		{

			marked[a[1]]=1;

			dq.push_back(a[1]);

		}

		else

		{

			dq.push_front(a[1]);

		}

		

		ma[a[1]]++;

	}

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <string>

#include <cmath>

#include <algorithm>

#include <vector>

#include <map>

#include <queue>

#include <set>

using namespace std;

typedef long long LL;

const int MaxN = 1e5;

const int Inf = 1 << 30;



int a[MaxN + 5];



int main()

{

	int n,p;

	while(~scanf("%d",&n)){

		for(int i = 1;i <= n;i++) scanf("%d",&a[i]);

		sort(a + 1,a + 1 + n);p = 0;

		for(int i = 2;i <= n;i++) if(a[i] == a[i - 1]) p++;

		p = p + (p % 2 == 0 ? 0 : 1);

		printf("%d\n",n - p);

	}

    return 0;

}

// Fastest known solution for this problem: