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

#include<map>

#include<iostream>

using namespace std;

const int maxn = 1000000000;

map<int,int> peo;

int main(){

    int n;

    scanf("%d",&n);

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

        int temp;

        cin>>temp;

        if(peo.find(temp) == peo.end()){

            peo[temp] = 1;

        }else{

            if(peo[temp] == 1){

                peo[temp] = 0;

            }else if(peo[temp] == 0){

                peo[temp] = 1;

            }

        }

    }

    int ans = 0;

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

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

    }

    cout<<ans;

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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



using namespace std;



int n,t;

set<int> sets;



int main()

{

    scanf("%d",&n);

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

    {

        scanf("%d",&t);

        if(sets.find(t)==sets.end())

            sets.insert(t);

        else

            sets.erase(t);

    }

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

    return 0;

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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

#include<cstring>

#include<iostream>

#include<cmath>

#include<map>

#include<string>

#include<cstring>

#include<algorithm>

using namespace std;



 



int main() {

	int n; 

	map<string, int>mp;

	scanf("%d", &n);

	getchar();

	string str;

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

		getline(cin, str);

		mp[str]++;

	}

	

	int cnt = 0;

	map<string, int>::iterator it;

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

		if (it->second % 2 == 1) {

			cnt++;

			//printf("%s ", it->first);

			//cout << it->first << endl;;

		}

	}

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

	return 0;

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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

#include<set>

using namespace std;

int main(){

	int n,k,num1,num2;

	set<int> st;

	scanf("%d",&n);

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

		scanf("%d",&k);

		num1=st.size();

		st.insert(k);

		num2=st.size();

		if(num1==num2)

		{

			st.erase(k);

		}

	}

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

	return 0;

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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

#include <algorithm>

#include <bits/stdc++.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

using namespace std;



int main(int argc, char** argv) {

	int n;

	scanf("%d",&n);

	

	int ren[n];

	int b,k=1;

	int cnt=n;

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

	{

		scanf("%d",&b);

		ren[i]=b;

	}

	

	sort(ren,ren+n);

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

	{

		while(ren[i+1]==ren[i])

		{

			k++;

			i++;

		}

		if(k%2==0) cnt-=k;

		else cnt=cnt-k+1;

		k=1;

	}

	printf("%d",cnt);

	return 0;

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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

#include <algorithm>

using namespace std;

int main()

{

    int n,i,j,sum=0,cnt;

    scanf("%d",&n);

    int num[n];

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

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

    sort(num,num+n);

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

    {

        cnt=1;

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

        {

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

            {

                if(num[j]==num[i-1])

                    cnt++;

            }

            sum=sum+cnt%2;

            i=i-1+cnt;

        }

        else

            sum++;

        if(i==n-1)sum++;

    }

    printf("%d",sum);

    return 0;

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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



using namespace std;



int main(){

	int n;

	double sum = 0;

	string temp;

	cin >> n;

	map<string, double> num;

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

		cin >> temp;

		if(num.find(temp) != num.end()){

			if(num[temp] == 0)

				num[temp] = 1;

			else

				num[temp] = 0;

		}

		else{

			num[temp] = 1;

		}

	}

	for(map<string, double>::iterator it = num.begin(); it != num.end(); it++){

		sum += it -> second;

	}

	cout << sum;

	

	return 0;

} 

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    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.855217021568241x):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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

#include <cstring>

#include <algorithm>

#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.855217021568241x):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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

#include <set>

using namespace std;



int main()

{

    set<int> s;

    int n,i,sum=0;

    cin>>n;

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

    {

        int x;

        cin>>x;

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

            s.insert(x);

        else s.erase(x);

    }

    sum=s.size();

    cout<<sum<<endl;

    return 0;

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}
// Slower C++ solution:
#include "iostream"

#include "map"

using namespace std;



int main()

{

	int n;

	map<int,int> m;

	int count=0;

	cin>>n;

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

	{

		int num;

		cin>>num;

		if(m[num]==0)

		{

			m[num]=1;

			count++;

		}

			

		else

		{

			m[num]=0;

			count--;

		}

	}

	cout<<count<<endl;

	system("pause");

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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

#include<string.h>

#include<algorithm>

using namespace std;

#include<set>

#pragma warning(disable:4996)

set<int> s;

void zaichangnei() {

	int N = 0;

	while (scanf("%d", &N) != EOF) {

		s.clear();

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

			int tmp = 0;

			scanf("%d", &tmp);

			if (s.find(tmp) == s.end())s.insert(tmp);

			else s.erase(tmp);

		}

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

	}

}

int main() {

	//baixianguo();

	//diancai();

	zaichangnei();

	return 0;

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

#include <cstdio>

#include <map>

using namespace std;

map<int,int> mp;

map<int,int>::iterator it;

int main(){

	int n,a;

	scanf("%d",&n);

	while(n--){

		scanf("%d",&a);

		mp[a]++;

	}

	int ans=0;

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

		if(it->second%2==1){

			ans++;

		}

	}

	cout<<ans;

	return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

using namespace std;

typedef long long ll;

ll v[100010];

ll ans[100010]={};

ll y[100010];

int main(){

    ios::sync_with_stdio(false);

    cin.tie(0);

    cout.tie(0);

    ll n;

    cin>>n;

    ll N=n;

    ll tot=0;

    while(N--){

        ll x;

        cin>>x;

        y[tot]=x;

        v[tot++]=x;

    }

    sort(v,v+tot);

    ll cnt=unique(v,v+tot)-v;

    for(ll i=0;i<tot;++i){

        ll pos=lower_bound(v,v+cnt,y[i])-v;

        ans[pos]++;

    }

    ll res=0;

    for(ll i=0;i<cnt;++i){

        if(ans[i]&1)

            res++;

    }

    cout<<res<<endl;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

using namespace std;



struct med{

	int time;

	int value;

	double rate;

}f[11];



int cmp(med a,med b){

	return a.rate>b.rate;

}



int main(){

	

	//test3//

	int N,i,count,flag;

	scanf("%d",&N);

	int a[N];

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

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

	}

	sort(a,a+N);

	count = 0;

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

		flag=1;

		while(a[i]==a[i+1]){

			flag++;

			i++;

		}

		if(flag%2==1){

			count++;

		}

	}

	printf("%d",count);

	//test3//

	

	return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

using namespace std;



int main() {

	int cnt = 0,n,a;

	map<int,bool> mp;

	cin>>n;

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

		cin>>a;

		if(mp[a]) {

			mp[a] = 0;

			cnt--;

		} else {

			mp[a] = 1;

			cnt++;

		}

	}

	cout<<cnt<<endl;

	return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

using namespace std;

#pragma GCC optimize("Ofast")

#pragma GCC optimize("unroll-loops")

#pragma GCC optimize ("-ffloat-store") // to restrict undesirable precision

#pragma GCC optimize ("-fno-defer-pop")// to pop argument of function as soon as it returns

#define all(a) a.begin(),a.end()

#define ll long long int

#define ld long double

ll power(ll a,ll b,ll m){ if(b==0) return 1; if(b==1) return a%m; ll t=power(a,b/2,m)%m; t=(t*t)%m; if(b&1) t=((t%m)*(a%m))%m; return t;}

ll modInverse(ll a, ll m) { return power(a, m-2, m); }

#define ps push_back

#define fs first

#define takeline cin.ignore();

#define sc second

#define N 3000005

#define endl "\n"

#define mod 1000000007

//((1.0l)*BIG MULTIPLY MAGIC?)

// string to integer stoi()

// string to long long stoll()

// string.substr(position,length);

// integer to string to_string();

//-----------------------------------------------

int main(){

	

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

	

	ll i,j,k,l,n;

	cin>>n;



	set<ll> st;

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

		cin>>k;

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

			st.erase(st.find(k));

		}

		else st.insert(k);

	}

	cout<<st.size();

	return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

using namespace std;

#define NL            "\n"

#define _SAD()        ios::sync_with_stdio(0),cin.tie(0), cout.tie(0);

#define SZ(s)         s.size()

#define SRT(x,y)      sort(x,x+y)

#define REV(a,b)      reverse(a,a+b)

#define VSRT(x)       sort(x.begin(),x.end())

#define VREV(x)       reverse(x.begin(),x.end())

int main()

{

    _SAD()

    int x,cnt=0;

    cin>>x;

    int a[x];

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

    {

      cin>>a[i];

    }

    SRT(a,x);

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

    {

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

        {

            i++;

        }

        else

        {

            cnt++;

        }

    }

    cout<<cnt<<NL;

    return 0;

}