stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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());

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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);

 } 

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

} 

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:




/*@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;

 }






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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}




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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

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

#define ll long long

#define endl "\n"

using namespace std ;

const int N = 1e7 + 4;

void FastInputOutput()

{

    ios_base :: sync_with_stdio( 0 ) ;

    cin.tie( 0 ) ;

    cout.tie( 0 ) ;

}

inline ll LLD()

{

    ll ret;

    scanf("%lld", &ret);

    return ret;

}

inline int D()

{

    int ret;

    scanf("%d", &ret);

    return ret;

}

void bin( int x )

{

    if(!x)

        return;

    bin( x / 2 );

    cout << x % 2 ;

}

bool checkPrimeNumber(int n)

{

    bool flag = true;

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

    {

        if (n % j == 0)

        {

            flag = false;

            break;

        }

    }

    return flag;

}

bool cmp(string last, string first)

{

    if(last.size() < first.size())

        return 1;

    return 0;

}

int calculateDigit(int n)

{

    double temp = (double)(n);

    double a = 0.39908-(0.434294 * n);

    double b = log10( n ) ;

    double c = ( n + 0.5 ) * b ;

    double ans = c - abs( a ) ;

    return ceil(ans) ;

}

int findDigits(int n)

{

    double E = 2.71828182845904523536;

    double PI = 3.141592654;



    if (n < 0)

        return 0;

    if (n <= 1)

        return 1;



    double x = ((n * log10(n / E) +

                 log10(2.0 * PI * n) /

                 2.0));



    return floor(x) + 1;

}

ll fact(ll n)

{

    ll ans = 1 ;

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

        ans *= i ;

    return ans ;

}



int arr[ N ];

int main()

{

    FastInputOutput() ;

    int n ;

    map < int, int > mp ;

    cin >> n ;

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

    {

        cin >> arr[ i ] ;

        ++mp[arr[ i ]] ;

    }

    int cnt = 0 ;

    map < int, int > ::iterator it ;

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

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

            ++cnt ;

    cout << cnt << endl ;



}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

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

using namespace std;



set<int> ada;

int n;



int main(){

	scanf("%d",&n);

	while(n--){

		int x;

		scanf("%d",&x);

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

		else ada.erase(x);

	}

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

	return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    memset(b,0,sizeof(b));

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

}