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

#include<cstring>

#include<iostream>

#include<map>

#include<cmath>

//#include<windows.h>

#include<algorithm>

#include<set>

const double eps = 1e-1;

using namespace std;

typedef long long ll;

map<int,int>play;

int main(){



    int n;

    scanf("%d",&n);

    int num=0;

    while(n--){

        int t;

        scanf("%d",&t);

        if(play[t]==1)play[t]--,num--;

        else play[t]++,num++;

    }

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

    return 0;

}

//Hello World Here I Come

//          0                 10

//        0 1 1                8

//      0 1 1 2 3              6

//    0 1 1 2 3 5 8            4

//  0 1 1 2 3 5 8 13 21        2

//0 1 1 2 3 5 8 13 21 34 55    0


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

using namespace std;



int main()

{

    int n,i,t;

    scanf("%d",&n);

    set<int> a;

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

        scanf("%d",&t);

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

            a.insert(t);

        else

            a.erase(t);

    }

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

}


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

#include<string>

#include<algorithm>

using namespace std;



int main() {

	int nums;

	map<string,bool> a;

	scanf("%d", &nums);

	map<string, bool> ::iterator it;

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

		string temp;

		cin >> temp;

		it = a.find(temp);

		if (it != a.end()) a.erase(it);

		else a[temp] = 1;

	}

	cout << a.size();

	return 0;

}

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

int main()

{

    int n;

    scanf("%d",&n);

    set<int> a;

    int x;

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

    {

        cin >> x;

        if(a.count(x) == 1)

            a.erase(x);

        else

            a.insert(x);



    }

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

    return 0;



}

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

using namespace std;



int main()

{

    int n,temp,con = 0;

    scanf("%d",&n);

    map<int,int> spare;

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

    {

        scanf("%d",&temp);

        if(spare[temp] == 0){

            spare[temp] = 1;

            con++;

        }

        else{

            spare[temp] = 0;

            con--;

        }

    }

    printf("%d",con);

    return 0;

}


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

using namespace std;

#include <algorithm>



int main(){

    std::ios::sync_with_stdio(false);

    int n,i,j,number,total=0,count;

    cin>>n;

    long long a[n],b[n][2]={};

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

        cin>>a[i];

    }

    sort(a,a+n);

    i=0;

    while(i<n){

        number=a[i];

        count=0;

        while(i<n && a[i]==number){

            count++;

            i++;

        }

        total+=count%2;

    }



    cout<<total;





    return 0;

}


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

#include<string.h>

#include<stdlib.h>

#include<iostream>

#include<algorithm>

#include<string>

#include<map>

#define maxn 1005

using namespace std;

typedef long long  LL;

map<string,int>mp;

int main()

{

    int n;

    scanf("%d",&n);

    while(n--)

    {

        string s;

        cin>>s;

        mp[s]++;

    }

        map<string,int>::iterator it;

        int sum=0;

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

        {

            int t=it->second;

            if(t%2==1)

                sum++;

        }

        cout<<sum<<endl;



}


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



int a[100001];



int main()

{

	int i,j,k,m,n;

	cin>>n;



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

		cin>>a[i];



	sort(a,a+n);

	int ans=0;

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

	{

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

		{

			i++;

			continue;

		}

		else

			ans++;

	}

	cout<<ans;

	return 0;

}

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



int main(){

	int n,cnt=0,x;

	set<int> s;

	cin>>n;

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

		cin>>x;

		if(s.find(x)!=s.end()){

			s.erase(x);

//			cout<<"00"<<endl;

			cnt++;

		}else{

			s.insert(x);

		}

	}

	cout<<n-2*cnt<<endl;

	return 0;

}

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

#include <cstdio>

#include <algorithm>

#include <string>

#include <math.h>

#include <map>

using namespace std;

#define ll long long

int n,m;

map<int,int> mp;

int main()

{

    scanf("%d",&n);

    int cnt = 0 ,x;

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

    {

        scanf("%d",&x);

        if(mp[x] == 0)

        {

            mp[x] = 1;

            cnt++;

        }

        else{

            if(mp[x] == 1)

            {

                mp[x] = 0;

                cnt--;

            }

        }

    }

    cout<<cnt<<endl;

    return 0;

}


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

#include<cstring>

using namespace std;

int map[100005];

int main()

{

	int n,sum;

	cin>>n;

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

	{

		cin>>map[i];

	}

	sort(map,map+n);

	int a,ssum=1;

	a=map[0];

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

	{

		if(a==map[i])

		{

			ssum++;

			if(i==n-1)

				sum+=(ssum%2);

		}

		else

		{

			a=map[i];

			sum+=(ssum%2);

			ssum=1;

			if(i==n-1)

				sum++;

		}



	}

	cout<<sum<<endl;

	return 0;

}

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

int a[100010];

int main()

{

	int n;

	scanf("%d",&n);

	int x;

	while(n--)

	{

		scanf("%d",&x);

		if(s.find(x)!=s.end())

		{

			s.erase(x);

		}

		else

		{

			s.insert(x);

		}	

	}

	

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

	return 0;

 } 

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

#include <map>

using namespace std;



int main()

{

    int n,num;

    map<int,int> m;

    map<int,int>::iterator iter;

    scanf("%d",&n);

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

    {

        scanf("%d",&num);

        iter = m.find(num);

        if(iter!=m.end())

            m.erase(num);

        else

            m[num]=1;

    }

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

    return 0;

}


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

#include <iterator>

using namespace std;



int main()

{

    map<int ,int >q;

    int n;

    cin >> n;

    int sum = 0;

    map<int , int>::iterator it;

    while(n--)

    {

        int temp;

        cin >> temp;

        it = q.find(temp);

        if(it == q.end())

        {

            q[temp] = 1;

            sum++;

        }else{

            if(q[temp]==1)

            {

                q[temp]=0;

                sum--;

            }else{

                q[temp]=1;

                sum++;

            }

        }

    }

    cout << sum << endl;

    return 0;

}


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

int main(){

     int N,x;

     cin>>N;

     set<int> st;

     while(N--){

         cin>>x;

        if(st.count(x)){

            st.erase(x);

         }else{

            st.insert(x);

        }

     }

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

     return 0 ;

}

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

#include <set>

#include <map>

#include <algorithm>

#include <iostream>

#include <string>

#define  debug	0

#define  MAXN  100010

using namespace std;

int count=0;

int hashTable[MAXN]={0};

map<int,int>id;

int getid(int n)

{	extern int count;

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

	{	id[n]= count++;

	}

	return id[n];

}

int main()

{				

#if debug 

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

#endif

	int N;

	scanf("%d",&N);

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

	{	int number,idd;

		scanf("%d",&number);

		idd = getid(number);

		hashTable[idd] = !hashTable[idd];

	}

	int cnt=0;

	extern int count;

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

	{

		if(hashTable[i])cnt++;

	}

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

}


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



struct med{

	int time;

	int value;

	double rate;

}f[11];



int cmp(med a,med b){

	return a.rate>b.rate;

}



int main(){

	/*

	int i,T,N,value=0;

	scanf("%d%d",&T,&N);

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

		scanf("%d%d",&f[i].time,&f[i].value);

		f[i].rate=f[i].value/f[i].time;

	}

	sort(f,f+N,cmp);

	i=0;

	while(i<N){

		if((T-f[i].time)>=0){

			value += f[i].value;

			T -= f[i].time;

		}

		i++;

	}

	printf("%d",value);

	*/

	

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

} 

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

using namespace std;

int main(){

  map<string, bool> mp;

  int n;

  scanf("%d", &n);

  string s;

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

    cin >> s;

    if(mp[s]){

      mp[s] = !mp[s];

    } else {

      mp[s] = true;

    }

  }

  int count = 0;

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

    if(it -> second){

      count ++;

    }

  }

  printf("%d", count);

  return 0; 

}

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



#define pb push_back

#define fi first

#define se second

#define mem(x,n) memset(x,n,sizeof(x))

#define sz(x) (int)(x).size()

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

#define foreach(it,l) for(auto it=(l).begin();it!=(l).end();it++)

#define pnl printf("\n")

#define endl '\n'

#define len(x) (x).length()



typedef long long LL;

typedef unsigned long long ULL;

typedef pair<int,int> PII;

typedef pair<LL,LL> PLL;

typedef vector<int> VI;

const double EPS=1e-10;

//const double PI=acos(-1.0);

const int INF=1<<30;

const LL LLINF=1ll<<60;

const int MOD=1e9+7;

const int xx[8]={1,0,-1,0,1,-1,1,-1};

const int yy[8]={0,1,0,-1,-1,1,1,-1};



void fastio(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); }



/***********************************\

     _____ _             _

    /  __ \ |           (_)

    | /  \/ | __ _ _ __  _  ___

    | |   | |/ _` | '_ \| |/ _ \

    | \__/\ | (_| | |_) | |  __/

     \____/_|\__,_| .__/|_|\___|

                  | |

                  |_|

\***********************************/



map<int,int> mp;



int main(){

	int tc;

	scanf("%d",&tc);

	while(tc--){

		int x;

		scanf("%d",&x);

		mp[x]++;

	}

	int cnt=0;

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

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

	}

	cout<<cnt<<endl;

	return 0;

}


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

typedef long long ll;

#define pb push_back

#define mp make_pair

#define fi first

#define se second

using namespace std;

ll n,i,ta,has;

map<ll,ll> me;

int main()

{

	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

	cin>>n;

	while(n--)

	{

		cin>>ta;

		if(me[ta])

		{

			has--;

			me[ta]=0;

		}

		else

		{

			me[ta]=1;

			has++;

		}

	}

	cout<<has<<"\n";

}

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

int n,ans,x;

map < int , bool > mp;

int main()

{

	scanf("%d",&n);

	while(n--)

	{

		scanf("%d",&x);

		if(mp[x])

		{

			ans--;

			mp[x] = 0;

		}

		else

		{

			ans++;

			mp[x] = 1;

		}

	}

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

	return 0;

}

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

}