stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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());

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

 } 

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

} 

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




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

#include <string>

#include <string.h>

#include <algorithm>

#include <vector>

#include <set>

#include <map>

#include <queue>

using namespace std;

const int maxn = 200010;

int n;

map<int,int> mp;

int cnt = 0;

int main(){

	cin >> n;

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

		int a;

		cin >> a;

		if(mp[a]%2==0){

			cnt++;

		}else{

			cnt--;

		}

		mp[a]++;

	}

	cout << cnt << endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#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;

}




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

#include<map>

using namespace std;

int main()

{



    int N,x;

    scanf("%d",&N);

    map<int,int> mp;

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

    {

        scanf("%d",&x);

        mp[x]++;

    }

    int k=0;

    for(map<int,int>::iterator it=mp.begin();it!=mp.end();it++){

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

            k++;

    }

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

    return 0;

}


// Optimized solution to the same problem (faster):
#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;

}




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

using namespace std;



const int N=1e5 +3;

int a[N];

map<int, int> mp;



int main(){



    int n;

    scanf("%d", &n);

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

        scanf("%d", a+i);

        ++mp[a[i]];

        --mp[a[i]];



        mp[a[i]] = !mp[a[i]];

    }



    int cnt=0;

    for(auto i:mp){

        if(i.second==1)

            ++cnt;

    }



    printf("%d", cnt);







    return 0;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):




/*@author hussein zayed ;

    ___  ___

   |\  \|\  \

   \ \  \_\  \

    \ \   ___ \USSEIN

     \ \  \\ \ \

      \ \__\\ \_\

       \|__| \|__|

****************************************

*/



#include <bits/stdc++.h>

using namespace std;

#define fr for(int i=0;i<n;++i)

#define fr1 for(int i=1;i<=n;++i)

#define cinA for(int i=0;i<n;++i){cin>>arr[i];}

#define cinA1 for(int i=1;i<=n;++i){cin>>arr[i];}

#define coutA for(int i=0;i<n;++i){cout<<arr[i]<<" ";}

#define ll long long

#define lnarray sizeof(arr)/sizeof(*arr)

#define vi vector<int>

#define vs vector<string>

void Fast()

{

    ios_base :: sync_with_stdio( 0 ) ;

    cin.tie( 0 ) ;

    cout.tie( 0 ) ;

}

inline int RD()

{

    int i ;

    cin>>i;

    return i;

}



inline float RF()

{

    float i ;

    cin>>i;

    return i;

}



inline double RDO()

{

    double i ;

    cin>>i;

    return i;

}



inline string RS()

{

    string i ;

    cin>>i;

    return i;

}



inline ll RLL()

{

    ll i ;

    cin>>i;

    return i;

}



int cm[200000];



ll sumSet(ll n)

{

    return (1ll*n*(n+1))/2;

}

string s;





bool isPrime(int n)

{

    if(n==1)

        return false;

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

    {

        if(n%i==0)

            return false;

    }

    return true;

}

int sumDigit(int n){

int sum =0;

  while (n != 0)

    {

        sum+= + n % 10;

        n = n / 10;

    }

    return sum;

}



ll power2(int n){

  ll ans=(1<<n);

  return ans;

}



ll sumpow2(ll n){

 ll sum=(n*(n+1)*(2*n-1))/6;

 return sum;

}



int main(){

    Fast();

//freopen("output.txt" , "w" , stdout);

//freopen("wall.in" , "r" , stdin);

 int n=RD();



    map<int, int> m;

     fr{

        int tmp=RD();

        m[tmp]++;

    }

    int cnt = 0;

    for(auto i : m) {

        if(i.second % 2 == 1) {

            cnt++;

        }

    }

    cout << cnt << endl;

    return 0;

 }






// Optimized solution to the same problem (faster):
#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;

}




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

using namespace std;

//*******************

// Mahmoud Magdy    *

//*******************

#define ll long long

#define endl "\n"



void fast()

{

    ios_base :: sync_with_stdio( 0 ) ;

    cin.tie( 0 ) ;

    cout.tie( 0 ) ;

}

inline int D()

{

    int m ;

    cin>>m;

    return m ;

}

inline ll lD()

{

    ll m ;

    cin>>m;

    return m ;

}

inline double dD()

{

    double m ;

    cin>>m;

    return m ;

}

ll arr[1000006];

map<int,int>fr;

int main()

{

int n=D();

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

    cin>>arr[i];

    fr[arr[i]]++;

}

set<int>st;

vector<int>v;

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

{

    if(!(st.count(arr[i])))

    {

        v.push_back(arr[i]);

        st.insert(arr[i]);

    }

}

int c=0;

for(int i=0;i<v.size();++i){

    if(fr[v[i]]%2)

        c++;

}

cout<<c<<endl;

}




// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem: