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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

	memset(a,0,sizeof(a));

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

	{

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

	}

	sort(a,a+n);

	int x=0;

	for(int j=0;j<n;)

	{

		if(a[j]==a[j+1])

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

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

using namespace std;

int main(void){

	int n,num=0,temp;

	cin>>n;

	set<int> st; 

	while(n--){

		cin>>temp;

		set<int>::iterator it = st.find(temp);

		if(it != st.end()){

			st.erase(it);

		}

		else st.insert(temp);

	} 

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

	return 0;

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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

	memset(a,0,sizeof(a));

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

	{

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

	}

	sort(a,a+n);

	int x=0;

	for(int j=0;j<n;)

	{

		if(a[j]==a[j+1])

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3909566677476326x):
//Written by:Poushi

//Dept_CSE of IUT

#include<iostream>

#include<cstdio>

#include<algorithm>

#include<bits/stdc++.h>

typedef long long int ll;

using namespace std;

#define fixedprecision(n) cout<<fixed<<setprecision(n)

#define frf(i,a,n) for(i=a;i<n;i++)

#define frb(i,b,n) for(i=b;i>n;i--)



int main()

{

    int n,t,i,j;

    set<int> st;

    set<int>::iterator it;

    cin>>t;

    while(t--)

    {

       cin>>n;

       it=st.find(n);

       if(it==st.end())

       {

           st.insert(n);

       }

       else

        st.erase(it);

    }

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

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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

	memset(a,0,sizeof(a));

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

	{

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

	}

	sort(a,a+n);

	int x=0;

	for(int j=0;j<n;)

	{

		if(a[j]==a[j+1])

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

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

using namespace std;



int main()

{

    int m, n;

    set<int> s;

    cin >> n;

    while(n--)

    {

        cin >> m;



        set<int>::iterator it=s.find(m);

        if(it==s.end()) s.insert(m);

        else s.erase(it);

    }



    cout << s.size();



    return 0;

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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

	memset(a,0,sizeof(a));

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

	{

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

	}

	sort(a,a+n);

	int x=0;

	for(int j=0;j<n;)

	{

		if(a[j]==a[j+1])

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3755907102793146x):
#include<iostream>

#include <bits/stdc++.h>

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

#define endl '\n'

using namespace std;

int main()

{

    fastio;

    long long n,i,val;

    map<long long, long long> mp;

    cin>>n;

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

    {

        cin>>val;

        if(mp.find(val)==mp.end())

        {

            mp[val]=1;

        }

        else

        {

            mp.erase(val);

        }

    }

    cout<<mp.size();

    return 0;

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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

	memset(a,0,sizeof(a));

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

	{

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

	}

	sort(a,a+n);

	int x=0;

	for(int j=0;j<n;)

	{

		if(a[j]==a[j+1])

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

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

using namespace std;



int main()

{

    int n,a;

    map<int,int>mp;

    set<int>s;

    cin>>n;



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

    {

        cin>>a;

        s.insert(a);

        mp[a]++;

    }

    a=s.size();

    for(int i:s)

    {

        if(mp[i]%2==0)

         a--;

    }

    cout<<a;



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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

	memset(a,0,sizeof(a));

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

	{

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

	}

	sort(a,a+n);

	int x=0;

	for(int j=0;j<n;)

	{

		if(a[j]==a[j+1])

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

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

using namespace std;



typedef long long ll;



int main()	

{

	int x,tc,ans = 0;

	cin>>tc;

	map<int,bool> m;

	while(tc--){

		cin>>x;

		m[x] = (m[x] + 1)%2;

		if(m[x]) ans++;

		else ans--;

	}

	cout<<ans<<'\n';

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

#include <cstdlib>

#include <iostream>

#include <fstream>

#include <sstream>

#include <set>

#include <map>

#include <vector>

#include <list>

#include <algorithm>

#include <cstring>

#include <cmath>

#include <string>

#include <queue>

#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic

#include <cassert>

#include <iomanip>        //do setprecision

#include <ctime>

#include <complex>

using namespace std;



#define FOR(i,b,e) for(int i=(b);i<(e);++i)

#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)

#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)

#define REP(x, n) for(int x = 0; x < (n); ++x)



#define ST first

#define ND second

#define PB push_back

#define MP make_pair

#define LL long long

#define ULL unsigned LL

#define LD long double



const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;

const int mod=1000000007;



int main(){

	int n,c=0;

	int a[101010]={};

	cin>>n;

	FOR(i,0,n){

		cin>>a[i];

	}

	int now=-1,r=0;

	sort(a,a+n);

	FOR(i,0,n){

		if(now==a[i]){

			r^=1;

		}else{

			c+=r;

			now=a[i];

			r=1;

		}

		//cout<<" "<<r<<endl;

	}

	c+=r;

	cout<<c<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.3987910145825135x):
#include <cstdio>

#include <cstdlib>

#include <iostream>

#include <fstream>

#include <sstream>

#include <set>

#include <map>

#include <vector>

#include <list>

#include <algorithm>

#include <cstring>

#include <cmath>

#include <string>

#include <queue>

#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic

#include <cassert>

#include <iomanip>        //do setprecision

#include <ctime>

#include <complex>

using namespace std;



#define FOR(i,b,e) for(int i=(b);i<(e);++i)

#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)

#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)

#define REP(x, n) for(int x = 0; x < (n); ++x)



#define ST first

#define ND second

#define PB push_back

#define MP make_pair

#define LL long long

#define ULL unsigned LL

#define LD long double



const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;

const int mod=1000000007;



int main(){

	int n,c=0;

	map<int,int> mp;

	cin>>n;

	FOR(i,0,n){

		int b;

		cin>>b;

		if(mp[b]==0){

			mp[b]++;

			c++;

		}else{

			mp[b]--;

			c--;

		}

	}

	

	cout<<c<<endl;

    return 0;

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

#include <cstdlib>

#include <iostream>

#include <fstream>

#include <sstream>

#include <set>

#include <map>

#include <vector>

#include <list>

#include <algorithm>

#include <cstring>

#include <cmath>

#include <string>

#include <queue>

#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic

#include <cassert>

#include <iomanip>        //do setprecision

#include <ctime>

#include <complex>

using namespace std;



#define FOR(i,b,e) for(int i=(b);i<(e);++i)

#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)

#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)

#define REP(x, n) for(int x = 0; x < (n); ++x)



#define ST first

#define ND second

#define PB push_back

#define MP make_pair

#define LL long long

#define ULL unsigned LL

#define LD long double



const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;

const int mod=1000000007;



int main(){

	int n,c=0;

	int a[101010]={};

	cin>>n;

	FOR(i,0,n){

		cin>>a[i];

	}

	int now=-1,r=0;

	sort(a,a+n);

	FOR(i,0,n){

		if(now==a[i]){

			r^=1;

		}else{

			c+=r;

			now=a[i];

			r=1;

		}

		//cout<<" "<<r<<endl;

	}

	c+=r;

	cout<<c<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.3881699737970652x):
#include <cstdio>

#include <cstdlib>

#include <iostream>

#include <fstream>

#include <sstream>

#include <set>

#include <map>

#include <vector>

#include <list>

#include <algorithm>

#include <cstring>

#include <cmath>

#include <string>

#include <queue>

#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic

#include <cassert>

#include <iomanip>        //do setprecision

#include <ctime>

#include <complex>

using namespace std;



#define FOR(i,b,e) for(int i=(b);i<(e);++i)

#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)

#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)

#define REP(x, n) for(int x = 0; x < (n); ++x)



#define ST first

#define ND second

#define PB push_back

#define MP make_pair

#define LL long long

#define ULL unsigned LL

#define LD long double



const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;

const int mod=1000000007;



int main(){

	int n,c=0;

	map<int,int> mp;

	cin>>n;

	FOR(i,0,n){

		int b;

		cin>>b;

		mp[b]++;

	}

	for(auto t:mp){

		c+=(t.ND)%2;

	}



	cout<<c<<endl;

    return 0;

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

using namespace std;

map <int,int> Map;

int main(){

    int n,a,ans=0;

    cin>>n;

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

        cin>>a;

        if(Map[a]==0)Map[a]=1,ans++;

        else Map[a]=0,ans--;

    }

    cout<<ans<<endl;

    return 0;

 } 

// Faster C++ solution for the same problem (measured speedup: 5.25202042021929x):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[100010];

int tmp;

int n,ans=1;

int main(){

	scanf("%d",&n);

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

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

	sort(a+1,a+n+1);

	tmp=a[1];

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

		if(tmp==a[i]){

			--ans;

			tmp=-1;

		}

		else{

			++ans;

			tmp=a[i];

		}

	}

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

	return 0;

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

#include <map>



typedef long long ll;

using namespace std;

map<ll,int> paper;



int main(){

	int N;

	scanf("%d",&N);	

	ll t;

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

		scanf("%lld",&t);	

		paper[t] += 1;

	}

	int ans = 0;

	map<ll,int>::iterator i;

	for(i = paper.begin(); i != paper.end(); i++){

		ans += (*i).second % 2;

	}

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

}


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

#include <algorithm>



typedef long long ll;

ll map[100000];

using namespace std;



int main(){

	int N;

	scanf("%d",&N);	

	for(int i = 0; i < N; i++) scanf("%lld",map+i);	

	sort(map,map+N);

	int i = 0;

	int ans = 0;

	while(i < N){

		int j = i;

		while(map[j] == map[i] && j < N) j++;

		ans += (j-i)%2;

		i = j;

	}

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

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

#include<set>

using std::set;



int n;

set<int> S;



int main(void){

	int n;

	scanf("%d",&n);

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

		scanf("%d",&temp);

		if(S.find(temp)!=S.end())

			S.erase(temp);

		else

			S.insert(temp);

	}

	return printf("%d\n",S.size()),0;

}

// Faster C++ solution for the same problem (measured speedup: 4.849632031843682x):
#include<cstdio>

#include<algorithm>

using namespace std;

long long n,a[100002],z=1,zs;

int main()

{

  scanf("%d",&n);

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

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

  sort(a+1,a+n+1);

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

    if(a[i]==a[i-1])  z=(z+1)%2;

    else  zs+=z,z=1;

  if(z%2)  zs++;

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

  return 0;

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

using namespace std;

long long n,a[100005],z,zs;

int main(){

    cin>>n;

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

        cin>>a[i];

    sort(a+1,a+n+1);

    z=1;

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

        if(a[i]==a[i-1]) z=(z+1)%2;

        else{ zs+=z; z=1;}

    zs+=z%2;

    cout<<zs<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2253066527695005x):
#include<cstdio>

#include<algorithm>

using namespace std;

long long n,a[100002],z=1,zs;

int main()

{

  scanf("%d",&n);

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

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

  sort(a+1,a+n+1);

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

    if(a[i]==a[i-1])  z=(z+1)%2;

    else  zs+=z,z=1;

  if(z%2)  zs++;

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

  return 0;

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

using namespace std;

long long sum;

set<int>s;

int main()

{

	int n,ai;

	cin>>n;

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

	{

		cin>>ai;

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

			s.insert(ai);

		else

			s.erase(ai);

	}

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

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.24267721692639x):
#include<cstdio>

#include<algorithm>

using namespace std;

long long n,a[100002],z=1,zs;

int main()

{

  scanf("%d",&n);

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

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

  sort(a+1,a+n+1);

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

    if(a[i]==a[i-1])  z=(z+1)%2;

    else  zs+=z,z=1;

  if(z%2)  zs++;

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

  return 0;

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

#include<set>

using std::set;



int n;

set<int> S;



int main(void){

	int n;

	scanf("%d",&n);

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

		scanf("%d",&temp);

		if(S.find(temp)!=S.end())

			S.erase(temp);

		else

			S.insert(temp);

	}

	return printf("%d\n",S.size()),0;

}

// Faster C++ solution for the same problem (measured speedup: 4.852290995392426x):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

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

using namespace std;

long long n,a[100005],z,zs;

int main(){

    cin>>n;

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

        cin>>a[i];

    sort(a+1,a+n+1);

    z=1;

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

        if(a[i]==a[i-1]) z=(z+1)%2;

        else{ zs+=z; z=1;}

    zs+=z%2;

    cout<<zs<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.228171591764767x):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

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

using namespace std;

long long sum;

set<int>s;

int main()

{

	int n,ai;

	cin>>n;

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

	{

		cin>>ai;

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

			s.insert(ai);

		else

			s.erase(ai);

	}

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

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.245551679880714x):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

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

#include<map>

using namespace std;

int main()

{

	int n,l,v=0;

	map<int,int>s;

	scanf("%d",&n);

	while(n--)

	{

		scanf("%d",&l);

		if(!s[l]) s[l]++,v++;

		else s[l]--,v--;

	}

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

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.853175833499244x):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

}
// Slower C++ solution:
// luogu-judger-enable-o2

#include<bits/stdc++.h>

using namespace std;

long long n,a[100002],z,zs;

int main()

{

    cin>>n;

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

      cin>>a[i];

    sort(a+1,a+n+1);

    z=1;

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

    {

        if(a[i]==a[i-1])z=(z+1)%2;

        else zs+=z,z=1;

    }

    if(z%2)

        zs++;

    cout<<zs<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.228580133147536x):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

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

using namespace std;

long long n,a[100002],z=1,ans=0;

int main()

{

    cin>>n;

    for(int i=1;i<=n;i++)cin>>a[i];

    sort(a+1,a+n+1);

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

    {

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

		{

			z=(z+1)%2;

		}

        else

		{

			ans+=z;

			z=1;

		}

    }

    if(z%2==1)ans++;

    cout<<ans<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.228141339328065x):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

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

using namespace std;

int main()

{

    int n;

    cin>>n;

    set <int> s;

    while(n--)

    {

        int x;

        cin>>x;

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

            s.erase(x);

        else

            s.insert(x);

    }

    cout<<s.size();

    return 0;

 } 

// Faster C++ solution for the same problem (measured speedup: 5.276504320681674x):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

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

using namespace std;

int a[1000010];

long long ans,n;

int main(void)

{

	cin>>n;

	for(int i=1;i<=n;i++) cin>>a[i];

	sort(a+1,a+1+n);

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

		if(a[i]==a[i+1]) ans+=2,i+=2;

			else i++;

	cout<<n-ans<<"\n";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.244072963818859x):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

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

using namespace std;

int main()

{

    int i, t;

    long long c=0;

    cin>>t;

    long long n;

    //vector <long long> a(1000000000);

    map<long long, bool> mp;

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

    {

        cin>>n;

        if(mp.count(n)==0)

        {

            mp[n]=1;

            c=c+1;

        }

        else{



            if(mp[n]==1)

            {

                c--;

                mp[n]=0;

            }

            else if(mp[n]==0)

            {

                mp[n]=1;

                c++;

            }

        }

    }

    cout<<c;



}


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

#include<algorithm>

using namespace std;

const int MAX=100000;

int main()

{int n;

scanf("%d",&n);

int i,j,count;

int xr[MAX];

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

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

}

sort(xr,xr+n);

count=n;

i=0;

while(i<n)

{if(xr[i+1]==xr[i])

{count=count-2;

i=i+2;

}

else i++;

}

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

return 0;

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

#include<set>



using namespace std; 



int main(){

    set<int> st;

    int N;

    cin >> N;

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

        int in;

        cin >> in;

        if(st.find(in)!=st.end()){

            st.erase(in);

        }else{

            st.insert(in);

        }

    }

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

}

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

#include<algorithm>

using namespace std;

const int MAX=100000;

int main()

{int n;

scanf("%d",&n);

int i,j,count;

int xr[MAX];

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

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

}

sort(xr,xr+n);

count=n;

i=0;

while(i<n)

{if(xr[i+1]==xr[i])

{count=count-2;

i=i+2;

}

else i++;

}

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

return 0;

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

#include <cstdlib>

#include <cmath>

#include <cstring>

#include <string>

#include <algorithm>

#include <iostream>

#include <iomanip>

#define For(i,j,k) for(int i=j;i<=k;i++)

#define Dow(i,j,k) for(int i=j;i>=k;i--)

#define LL long long

using namespace std ;

inline int read() {

	int x = 0 , f = 1 ;

	char ch = getchar() ;

	while(ch<'0'||ch>'9') { if(ch=='-') f = -1 ; ch = getchar() ; }

	while(ch>='0'&&ch<='9') { x = x * 10+ch-48 ; ch = getchar() ; }

	return x * f ;

}



const int N = 1e5+11;

int n,sum,tot;

int a[N];



int main() {

	n=read(); 

	For(i, 1, n) a[i]=read();

	sort(a+1,a+n+1);

	a[0] = a[1]-1;

	For(i, 1, n) 

		if(a[i]==a[i-1]) sum++;

		else {

			if(sum&1) tot++;

			sum = 1;

		}

	if(sum&1) tot++;

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

}
















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

#include<algorithm>

using namespace std;

const int MAX=100000;

int main()

{int n;

scanf("%d",&n);

int i,j,count;

int xr[MAX];

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

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

}

sort(xr,xr+n);

count=n;

i=0;

while(i<n)

{if(xr[i+1]==xr[i])

{count=count-2;

i=i+2;

}

else i++;

}

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

return 0;

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



using namespace std;



int main(){

    int n;

    cin>>n;

    map<string,int>m;

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

        string s;

        cin>>s;

        m[s]++;

    }

    int ans=0;

    for(auto x:m){

        if(x.second%2)ans++;

    }

    cout<<ans<<endl;

}

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

#include<algorithm>

using namespace std;

const int MAX=100000;

int main()

{int n;

scanf("%d",&n);

int i,j,count;

int xr[MAX];

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

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

}

sort(xr,xr+n);

count=n;

i=0;

while(i<n)

{if(xr[i+1]==xr[i])

{count=count-2;

i=i+2;

}

else i++;

}

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

return 0;

 }