stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;





int main()

{

    int n;

    while(cin>>n)

    {

        set<int>S;

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

        {

            int x;

            scanf("%d",&x);

            if(S.count(x))S.erase(x);

            else S.insert(x);

        }

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

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.857327948660647x):
#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<string.h>

#include<set>

#include<algorithm>

using namespace std;

set<int>st;

int main()

{

    int t;

    cin>>t;

    while(t--)

    {

        int u;

        cin>>u;

        if(st.find(u)!=st.end())

        {

            st.erase(u);

        }

        else

           st.insert(u);

    }

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

}


// Faster C++ solution for the same problem (measured speedup: 4.856421302061713x):
#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;

  scanf("%d",&n);

  set<int>a;

  int temp;

  int sum=0;

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

    scanf("%d",&temp);

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

        sum--;

        a.erase(temp);

    }

    else{

        sum++;

        a.insert(temp);

    }

  }

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

}


// Faster C++ solution for the same problem (measured speedup: 4.835801496240754x):
#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:
//#define LOCAL

#define INPUT

#include <cstdio>

#include <cstring>

#include <algorithm>

#include <vector>

#define MAXSIZE 10010





#include <map>



using std::map;



int main(){

    #ifdef LOCAL

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

    #endif



    int n = 0;

    scanf("%d", &n);



    map<int, int> imap;

    int ii;

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

        scanf("%d", &ii);

        imap[ii]++;

    }

    int res = 0;

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

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

            res++;

        }

    }

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







    return 0;



}


// Faster C++ solution for the same problem (measured speedup: 4.491730484528559x):
#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<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: 4.8791092982660444x):
#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 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: 4.7985384602344325x):
#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<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: 4.896804968122044x):
#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<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.487905400462382x):
#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 <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: 4.783153466150917x):
#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 <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: 4.782735459225993x):
#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;

	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: 4.954076314307433x):
#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 <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.490334612793521x):
#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 <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.490334612793521x):
#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> 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: 4.897246900931214x):
#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 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: 5.298664097532743x):
#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> 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: 5.290548556055794x):
#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 <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: 5.153969814542685x):
#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;

    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: 5.302203756064155x):
#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;

typedef long long ll;





int main()

{

    int n;

    while(cin>>n)

    {

        set<int>S;

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

        {

            int x;

            scanf("%d",&x);

            if(S.count(x))S.erase(x);

            else S.insert(x);

        }

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

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.252032057585273x):
#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<set>

#include<algorithm>

using namespace std;

set<int>st;

int main()

{

    int t;

    cin>>t;

    while(t--)

    {

        int u;

        cin>>u;

        if(st.find(u)!=st.end())

        {

            st.erase(u);

        }

        else

           st.insert(u);

    }

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

}


// Faster C++ solution for the same problem (measured speedup: 5.25105173732425x):
#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;

  scanf("%d",&n);

  set<int>a;

  int temp;

  int sum=0;

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

    scanf("%d",&temp);

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

        sum--;

        a.erase(temp);

    }

    else{

        sum++;

        a.insert(temp);

    }

  }

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

}


// Faster C++ solution for the same problem (measured speedup: 5.228756376101479x):
#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:
//#define LOCAL

#define INPUT

#include <cstdio>

#include <cstring>

#include <algorithm>

#include <vector>

#define MAXSIZE 10010





#include <map>



using std::map;



int main(){

    #ifdef LOCAL

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

    #endif



    int n = 0;

    scanf("%d", &n);



    map<int, int> imap;

    int ii;

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

        scanf("%d", &ii);

        imap[ii]++;

    }

    int res = 0;

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

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

            res++;

        }

    }

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







    return 0;



}


// Faster C++ solution for the same problem (measured speedup: 4.856726321162213x):
#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;

}