stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <cmath>

#include <algorithm>

#include <cstring>

#include <iostream>

#include <cstdio>

#include <ctype.h>

#include <string>

#include <vector>

#include <map>

#include <set>

#include <unordered_map>

#define INF 0x3fffffff

#define DEBUG 1

#define MAXSIZE 100005

using namespace std;

typedef long long LL;



map<int, bool> mapp;

int main() {

	int n;

	scanf("%d", &n);

	int num = 0;

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

		int a;

		scanf("%d", &a);

		if (mapp.count(a) == 0 || mapp[a] == false) {

			num++;

			mapp[a] = true;

		}

		else {

			num--;

			mapp[a] = false;

		}

	}

	printf("%d", num);

	printf("\n");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.216141995781108x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<vector>

#include<set>

using namespace std; 

set<int> table;

int main(){

	int n;

	scanf("%d",&n);

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

		int temp;

		bool flag = true;

		scanf("%d",&temp);

		set<int>::iterator it;

		//find

		it = table.find(temp);

		if(it==table.end()) table.insert(temp);

		else table.erase(it); 

	} 

	printf("%d",table.size());

	return 0; 

} 

// Faster C++ solution for the same problem (measured speedup: 4.841857119555863x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <stdio.h>

#include <set>

#define MAXSIZE 100010

using namespace std;

long long a[MAXSIZE];

set<long long> st;



int main()

{

    int n;

    int num = 0;

    set<long long>::iterator it;

    cin>>n;

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

    {

        cin>>a[i];

        it = st.find(a[i]);

        if(it == st.end())

        {

            st.insert(a[i]);

            num++;

        }

        else

        {

            st.erase(a[i]);

            num--;

        }

    }

    cout<<num<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.253193330940919x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <stdio.h>

#include <math.h>

#include <algorithm>

#include <string>

#include <map>

#include <queue>

#include <vector>

#include <string.h>

using namespace std;

map<string,int>mp;

int main()

{

    int n;

    scanf("%d",&n);

    int cnt = 0;

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

        string c;

        cin>>c;

        if (mp.find(c)==mp.end()){

            cnt++;

            mp[c] = 1;

        }

        else {

            cnt--;

            mp.erase(c);

        }

    }

    printf("%d",cnt);

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.286752967255221x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

using namespace std;

int cmp(const void* a,const void* b){

	return *(const int*)a-*(const int*)b;

}

int main(){

	int n=0;

	cin>>n;

	int *a=new int[n];

    int count=0;

    int i=0;

	while(i<n){

	cin>>a[i++];

	}

	qsort(a,n,sizeof(int),cmp); 

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

		int temp=1;

		while(i<(n-1)&&a[i]==a[i+1]){

		   temp++;

		   i++;

	    }

		if(temp&0x01)count+=1 ;

	}

	cout<<count;

}


// Faster C++ solution for the same problem (measured speedup: 5.225729651652604x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <cstdio>

#include <set>

using namespace std; 

int main(){

	set<int> st;

	int n,a,count=0;

	scanf("%d",&n);

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

		scanf("%d",&a);

		if(st.count(a)==0){

			st.insert(a);

			count++;

		}else{

			st.erase(a);

			count--;

		}

			

	}

	printf("%d",count);

	return 0; 

}

// Faster C++ solution for the same problem (measured speedup: 4.840316036615358x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include<cstdio>

#include<cstdlib>

#include<hash_map>

#include<algorithm>

using namespace std;

using namespace __gnu_cxx;

int main()

{

    int n;

    cin>>n;

    hash_map<int,int>mp;

    int cnt=0;

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

    {

        int x;

        cin>>x;

        hash_map<int,int>::iterator it;

        it=mp.find(x);

        if(it!=mp.end())

        {

            mp[x]++;

        }

        else

        {

            mp[x]=1;

        }

    }

    /*map<int,int>::iterator iter;

    iter=mp.begin();

    int cnt=0;

    while(iter!=mp.end())

    {

        if((iter->second)==1)

            ++cnt;

        ++iter;

    }*/

    hash_map<int,int>::iterator it;

    it=mp.begin();

    while(it!=mp.end())

    {

        if((it->second)%2!=0)

            ++cnt;

        ++it;

    }

    cout<<cnt;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2806047682273904x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<set>

using namespace std;



int main() {

	set<int> st;

	int n, x;

	scanf("%d", &n);

	while (n--) {

		scanf("%d", &x);

		if (st.count(x) == 0)

			st.insert(x);

		else

			st.erase(x);

	}

	printf("%d", st.size());

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.83962056145871x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<stdlib.h>

#include<stdio.h>

#include <string.h>

#include <iostream>

#include <string>

#include <algorithm>

#include<queue>

#include<map>

using namespace std;

int main() {

	int n;

	scanf("%d",&n);

	map<int,int> mp;

	int num = 0;

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

	{

		int temp;

		scanf("%d",&temp);

		if(mp[temp]==1)

		{

			mp[temp]=0;

			num--;

		}

		else

		{

			 mp[temp] = 1;

			 num++;

		}

	}

	printf("%d",num);

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2133045284065815x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<stdio.h>

#include<map>

using namespace std;

map<int,bool> m;

int main(){

	int N;int no;int ans=0;

	scanf("%d",&N);

	while(N--){

		scanf("%d",&no);

		if(m.find(no)==m.end()){

			m[no]=true;

			ans++;

		}

		else if(m[no]==false){

			m[no]=true;

			ans++;

		}

		else{

			m[no]=false;

			ans--;

		}

	}

	printf("%d\n",ans);

	return  0;

}

// Faster C++ solution for the same problem (measured speedup: 4.845773389879829x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<set>

using namespace std;

int main()

{

	set<int> st;

	int n,x;

	scanf("%d",&n);

	while(n--)

	{

		scanf("%d",&x);

		if(st.count(x)==0)

			st.insert(x);

		else st.erase(x);

	}

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

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.841752383039816x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<algorithm>

using namespace std;

int main()

{

	int i,n,ptr,currcount,lastnum,res=0;

	int *a;

	scanf("%d",&n);

	a=new int [n];

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

		scanf("%d",&a[i]);

	sort(a,a+n);

	ptr=0;

	while(ptr<n)

	{

		lastnum=a[ptr];

		currcount=0;

		while(ptr<n&&a[ptr]==lastnum)

		{

			currcount++;

			ptr++;

		}

		res+=currcount%2;

	}

	printf("%d\n",res);

	delete [] a;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.800834760975095x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <set>

using namespace std;

int main(){

	set<int>s;

	int n;

	cin>>n;

	while(n--){

		int k;

		cin>>k;

		if(s.find(k)==s.end())

			s.insert(k);

		else

			s.erase(k);

		

	}

	cout<<s.size()<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.276723611150098x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>

#include <cstdio>

#include <cstring>

#include <algorithm>

#include <set>

using namespace std;

using std::sort;





int main(){

    int  x,n;

    set<int> a;

//    printf("1\n");

    scanf("%d",&n);

    while(n--){

        scanf("%d",&x);

        if(a.count(x)==1){

            a.erase(x);

        }else{

            a.insert(x);

        }

        

      



    }

    printf("%d",a.size());

}


// Faster C++ solution for the same problem (measured speedup: 5.213215237229963x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cstdlib>

#include <algorithm>

#define DEBUG 0

using namespace std;



int main()

{

    #if DEBUG

    freopen("test.txt","r",stdin);

    #endif // DEBUG

    int buf[100000];

    int N;

    scanf("%d", &N);

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

    {

        scanf("%d", &buf[i]);

    }



    sort(buf, buf+N);//排序后，nlogn

    //获得所有奇数的数量

    int countN = 0;

    int temp = 1;//统计数字重复次数

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

    {

        if(buf[i]==buf[i+1])

        {

            temp++;

            continue;

        }

        else

        {

            if(temp%2!=0){

                countN++;

            }

            temp = 1;//还原

        }

    }

    printf("%d", countN);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.194426662196637x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<string>

#include<vector>

#include<algorithm>

#include<set>

using namespace std;



int main()

{

	int n, number;

	int sum = 0;

	cin >> n;

	set<int> s;

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

	{

		cin >> number;

		if(s.count(number) == 0)

		{

			s.insert(number);

		}

		else if(s.count(number) == 1)

		{

			s.erase(number);

		}

	}

	cout << s.size() << endl;

	

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.275818340306673x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <stdlib.h>

#include <algorithm>

using namespace std;

long long a[110000];

int n,k;

int cmp(void const*a,void const *b )

{

	int c=*(int*)a;

	int d=*(int*)b;

	return (c-d);

}

int main()

{

	

	scanf("%d",&n);

	

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

	{

		scanf("%d",&a[i]);

	}

	//qsort(a,n,sizeof(a[0]),cmp);

	sort(a,a+n);

	

	int ans=0;

	int i=0,tmp=0;	

	a[n]=-1;

	while(i<n)

	{

		if (a[i]==a[i+1]) tmp++;

		else //if (a[i]!=a[i-1]) 

		{

			tmp++;

			ans+=tmp%2;

			tmp=0;

		}

		i++;

	}

	printf("%d",ans);

//fclose(stdin);

 } 

// Faster C++ solution for the same problem (measured speedup: 5.15484286653772x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

	int n,x=1,ans=0;

	cin>>n;

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

	   cin>>a[i];

	sort(a,a+n);

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

	{

		if(a[i]==a[i-1])

		  x=(x+1)%2;

		else

		{

			ans+=x;

			x=1;

		}	  

	}

	if(x%2)

	  ans++;

	cout<<ans<<endl;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.23312036581073x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstring>

#include <algorithm>

#include <cstdio>

#include <set>

using namespace std;



int main() {

   set<int>s;

   int n;

   cin >> n;

   int cont=n;

   while(n--){

      int a;

      cin >> a;

      if(s.count(a) == 1 && !s.empty()) {

          cont -= 2;

          s.erase(a);

      }

      else

          s.insert(a);

   }

   cout<< cont << endl;

   return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.278972247755196x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <cstdio>

#include <cstring>

#include <cmath>

#include <set>

#include <iomanip>

#include <vector>

#include <queue>

#include <map>

#include <numeric>

//#include <bits/stdc++.h>



using namespace std;

const int INF = 1 << 30;

map<int,int> m;



int main()

{

    ios::sync_with_stdio(false);

    int n;

    cin>>n;

    int x;

    int ans=0;

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

    {    

        cin>>x;

        m[x]++;

    }

    for(auto i: m )

    {

        

        if(i.second%2)

            ans++;

    }

    cout<<ans<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.300828553379549x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cmath>

#include<set>

using namespace std;

set<int> s;

int main()

{

	int n,x,i;

	cin>>n;

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

	{

		cin>>x;

		if(s.find(x)!=s.end())

		   s.erase(x);

		else

		  s.insert(x);

	}

	cout<<s.size()<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.237435240925341x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstring>

#include<cstring>

#include<stdlib.h>

using namespace std;

#include<algorithm>

long long a[100005];

int main()

{

	int t;

	cin>>t;

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

		cin>>a[i];

	sort(a,a+t);

	int sum=0,ac=1;

	for(int i=1;i<t;i++)

	{

		if(a[i]==a[i-1])

			{

				ac++;

				ac=(ac)%2;

			}

		else

			sum+=ac,ac=1;

	}

	if(ac%2)

		sum++;

		cout<<sum;

}

// Faster C++ solution for the same problem (measured speedup: 5.226835122713082x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cstdlib>

#include <algorithm>

#include <vector>

#include <set>

#include <cmath>

#include <map>

#define MAXSIZE 10007

using namespace std;



map<int, bool> mp;



int main() {

	int N;

	cin >> N;

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

		int t;

		cin >> t;

		mp[t] = !mp[t];

	}

	int ans = 0;

	for (auto it = mp.begin(); it != mp.end(); it++) {

		if (it->second == true) ans++;

	}

	cout << ans;

}

// Faster C++ solution for the same problem (measured speedup: 5.234675294845708x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&a[i]);

    sort(a,a+n);

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

    {

        if(a[i]==a[i-1])

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

    printf("%d\n",ans);

    return 0;

}