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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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

using namespace std;

int main()

{

   map <long long int, long long int >mp;

   map <long long int, long long int >:: iterator it;

   vector<long long int >v;

   long long int n,i,j,k,c=0,x;

   cin>>n;

   while(n--)

   {

       cin>>x;

       mp[x]++;

   }

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

   {

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

        c++;

   }

   cout<<c<<endl;

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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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

#include<stack>

#include<algorithm>

#include<numeric>

#include<cstring>

#include<set>

#define MAXN 1000000

using namespace std;

typedef long long ll;



int main()

{

    set<int> s;

    int N;

    scanf("%d",&N);

    int a;

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

        scanf("%d",&a);

        bool flag=s.insert(a).second;

        if(!flag)

            s.erase(a);

    }

    int ct=s.size();

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

    return 0;

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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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

using namespace std;

#define endl "\n"

#define ll long long

#define MOD 1000000007

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



main()

{   FAST;

    int t,n,c=0,k;

    cin>>t;

    map<int,int>mp;

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

        cin>>k;

        mp[k]++;

    }

    for(auto it:mp){

        if(it.second &1) c++;

    }

    cout<<c;

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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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



using namespace std;



#define LL           long long

#define ULL          long long unsigned

#define LD           long double

#define ff              first

#define ss              second

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

#define FLR(i,n)     for(LL i=0;i<n;i++)

#define RFOR(i,n)    for(int i=n-1;i>=0;i--)

#define RFLR(i,n)    for(LL i=n-1;i>=0;i--)

#define rep(i,a,b)   for(int i=a;i<=b;i++)

#define repl(i,a,b)  for(LL i=a;i<=b;i++)

#define fast         ios_base::sync_with_stdio(0);cin.tie(0);

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

#define ABS(x)       ((x)<0?-(x):(x))

#define NL           "\n"

#define pb           push_back

#define mk              make_pair

#define pi           acos(-1.0)

#define prec(n)      fixed << setprecision(n)

#define sq(a)          (a)*(a)

#define asi          cout<<"check"<<" ";

#define all_set(arr,val) memset(arr,val,sizeof(arr))



int main()

{

    fast;

    int i,j,k,ans,n,x;

    cin>>n;

    set<int>st;

    while(n--){

        cin>>x;

        if(st.find(x)==st.end())st.insert(x);

        else st.erase(x);

    }

    cout<<st.size();





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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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

#include <vector>

using namespace std;



int main()

{

    long int n;

    cin >> n;



    vector <long int> vec;

    long int input;



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

    {

        cin >> input;

        vec.push_back(input);

    }



    sort(vec.begin(),vec.end());



    for(long int j=1; j<vec.size(); j++)

    {

        if(vec[j] == vec[j-1])

        {

            vec.erase(vec.begin() + (j - 1));

            vec.erase(vec.begin() + (j - 1));



            j--;

        }

    }



    cout << vec.size();

    return 0;

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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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

using namespace std;



int main(){

	int n,x;

	cin>>n;

	vector <int> v;

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

		cin>>x;

		v.push_back(x);

	}

	sort(v.begin(),v.end());

	

	/*

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

		cout<<v[i]<<" ";

	}

	*/

	int duplicate=0,no=0;

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

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

			duplicate++;

			i+=2;

		}

		else{

			i++;

			no++;

		}		

	}

	cout<<no<<endl;

	

	return 0;

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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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

#include<algorithm>

#include<cstring>



using namespace std ;



int main()

{

    int n;

    cin>>n;

    int a[n],tem,count[n],k=0,ans=0;



    memset(count,1,sizeof(count));



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

    {

        cin>>a[i];

    }

    sort(a,a+n);



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

    {

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

        {

            count[k]++;

        }

        else

            k++;

    }



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

    {

        if(count[j]%2==1)

        {

            ans++;

        }

    }

    cout<<ans<<endl ;

    return 0;

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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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

#include<map>

using namespace std;

int main()

{

	ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    int a, n;

    map<int, bool>m;

    cin>>n;

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

    {

    	cin>>a;

    	if(m[a])

    		m.erase(a);

    	else

    		m[a]=true;

    }

    cout<<m.size();

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

#include <algorithm>

#include <vector>

#include <list>

#include <climits>

#include <queue>

#include <string>

#include <map>

#include <stack>

#include <cmath>

#include <regex>

#include<ctime>

#include<set>

using namespace std;

int main()

{

ios::sync_with_stdio(false);

int n;

cin>>n;

set<int> s;

while(n--)

{

    int t;

    cin>>t;

    auto it=s.find(t);

    if(it!=s.end())

        s.erase(t);

    else

        s.insert(t);

}

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

}


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

#include <map>

using namespace std;



map<long long, bool> mp;

int main()

{

	int n, cnt = 0;

	long long id;

	scanf("%d", &n);

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

	{ 

		scanf("%lld", &id);

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

		{

			mp[id] = true;

			cnt++;

		}

		else

		{

			if (mp[id] == true)

			{

				mp[id] = false;

				cnt--;

			}

			else

			{

				mp[id] = true;

				cnt++;

			}

		}

	}

	printf("%d", cnt);

	return 0;

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

#include<algorithm>

using namespace std;



int *n;

int ans=0;

int N,i;



int main(){

	cin>>N;

	n=new int[N];

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

		cin>>n[i];

	}



	sort(n,n+N);



	while(i<N){

		int cnt=0,next=n[i];

		while(i<N && n[i]==next){

			cnt++;

			i++;

		}

		ans+=cnt%2;

	}



	cout<<ans<<endl;

	delete[]n;

	return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

}
// Slower C++ solution:
#pragma GCC optimize("O2")

#pragma G++ optimize("O2")

#include<cstdio>

#include<algorithm>

#include<map>

#define ll long long

#define For(i,x,y)  for(ll i=x;i<=y;++i)

#define FOr(i,x,y)  for(ll i=x;i>=y;--i)

#define lf else if

using namespace std;

inline ll read(){   ll 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-'0';ch=getchar();}  return x*f; } 

inline void write(ll x){    if (x<0) putchar('-'),x=-x; if (x>=10) write(x/10);   putchar(x%10+'0');  } 

inline void writeln(ll x){ write(x);   puts("");   }

map<ll,ll>mp;

ll n,ans;

int main(){

	n=read();

	For(i,1,n){

		ll x=read();

		if (mp[x])	mp[x]^=1,ans--;

		else	mp[x]^=1,ans++;

	}writeln(ans);

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#define ll long long

#define N 2005

#define oo 1000000000

#define zyy 1000000007

#define For(i,x,y) for(int i=x;i<=y;i++)

#define Rep(i,x,y) for(int i=x;i>=y;i--)

#define Forn(i,x,y) for(int i=x;i<y;i++)

using namespace std;

inline int read(){

	int x=0,f=0;char ch=getchar();

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

	for(;ch>='0'&&ch<='9';ch=getchar()) x=(x<<1)+(x<<3)+ch-48;

	return f?-x:x;

}

set<int> s;

int n;

int main(){

	n=read();

	For(i,1,n){

		int x=read();

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

		else s.erase(x);

	}

	cout<<s.size();

	return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include<map>

using namespace std;



int main()

{

	map<int, bool> mp;

	int n;

	scanf("%d",&n);

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

	{

		int temp;

		scanf("%d", &temp);

		if (mp[temp])

			mp.erase(temp);

		else

			mp[temp] = true;



	}

	cout << mp.size();

	return EXIT_SUCCESS;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include <algorithm>

#include <vector>

#include <list>

#include <climits>

#include <queue>

#include <string>

#include <map>

#include <stack>

#include <cmath>

#include <regex>

#include<ctime>

#include<set>

using namespace std;

int main()

{

ios::sync_with_stdio(false);

int n;

cin>>n;

set<int> s;

while(n--)

{

    int t;

    cin>>t;

    auto it=s.find(t);

    if(it!=s.end())

        s.erase(t);

    else

        s.insert(t);

}

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

}


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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include <set>

using namespace std;



int main(void){

	int n;

	scanf("%d",&n);

	set<long long> ss;

	long long cnt;

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

		cin>>cnt;

		if(ss.find(cnt)!=ss.end()) ss.erase(cnt);

		else ss.insert(cnt);

	}

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

	return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include <map>

using namespace std;



map<long long, bool> mp;

int main()

{

	int n, cnt = 0;

	long long id;

	scanf("%d", &n);

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

	{ 

		scanf("%lld", &id);

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

		{

			mp[id] = true;

			cnt++;

		}

		else

		{

			if (mp[id] == true)

			{

				mp[id] = false;

				cnt--;

			}

			else

			{

				mp[id] = true;

				cnt++;

			}

		}

	}

	printf("%d", cnt);

	return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include <cstdio>  

#include <cstring> 

#include <cmath> 

#include <string> 

#include <vector> 

#include <set>   

#include <map>

#include <queue> 

#include <stack> 

#include <algorithm> 



using namespace std;



int main(int argc,char* argv[])

{

    int N;

    map<string,int> mp;

    string str;

    scanf("%d",&N);

   

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

    {

        cin>>str;

        if(mp[str]==0)

          mp[str] = 1;

        else

          mp[str] = 0;

    }

    

    map<string,int>::iterator it = mp.begin();

    int cnt = 0;

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

    {

    	if(it->second!=0)

    	  cnt++;

    }

    

    printf("%d",cnt);

	return 0;

}




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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include<map>

#include<cstdio>

#include<cstring>

#include<algorithm>

#include<set> 

#include<stack>

using namespace std;



map<int,int> mp;

int main(){

int n;

cin>>n;

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

{   int temp;

    cin>>temp;

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

    mp[temp]=1;

    else if(mp[temp]==0)

    mp[temp]=1;

    else if(mp[temp]==1)

    mp[temp]=0; 

}

int count=0;

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

{

	if(it->second==1)

	count++; 

}

cout<<count;

return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include<cstdio>

#include<set>

using namespace std;



int main(){

	int n,a,num=0;

	set<int> s;

	scanf("%d",&n);

	while(n--){

		scanf("%d",&a);

		if(s.count(a)!=0){

			s.erase(a);

			num--;

		}

		else{

			s.insert(a);

			num++;

		}

	}

	printf("%d",num);

	return 0;

	system("pause");

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include<cstdio>

#include <string>

#include <map>

#include <algorithm>

using namespace std;







int main()

{

	map<int, int> record;

	int n;

	int x;

	cin >> n;

	while (n--)

	{

		cin >> x;

		if (record[x] == 0)

			record[x] = 1;

		else

			record[x] = 0;

	}

	int k = 0;

	for (auto it : record)

	{

		if (it.second == 1)

			k++;

	}

	cout << k << endl;

}


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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

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

#include<algorithm>

using namespace std;

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

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

}

int main(){

	int n=0;

	cin>>n;

	int *a=new int[n];

    int count=0;

    int i=0;

	while(i<n){

	cin>>a[i++];

	}

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

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

		int temp=1;

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

		   temp++;

		   i++;

	    }

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

	}

	cout<<count;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int N;

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

    {

        int buf[N];

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

        {

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

        }

        sort(buf,buf+N);

        int ptr = 0;

        int res = 0;

        //以下为找相同元素个数的方法

        while(ptr<N)

        {



            int lastNumber = buf[ptr];

            int countSum = 0;

            while(buf[ptr]==lastNumber&&ptr<N)

            {

                ptr++;

                countSum++;

            }

            res+=countSum%2;

        }

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

    }

    return 0;

}