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

using namespace std;

map<int,int> mp;

int n,ans;

int a[100010];

 int main()

{

	scanf("%d",&n);

	for (int i=1;i<=n;++i) scanf("%d",&a[i]);

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

		if (mp[a[i]]) mp[a[i]]=0;

		else mp[a[i]]=1;

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

		if (mp[a[i]]) ++ans,mp[a[i]]=0;

	printf("%d",ans);

}

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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include <set>

using namespace std;



int main(void)

{

    int N,x;

    scanf("%d",&N);

    set<int> s;

    while(N--)

    {

        scanf("%d",&x);

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

            s.insert(x);

        else

            s.erase(x);

    }

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

    return 0;

}


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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include <cstdlib>

#include <cstring>

#include <iostream>

#include <algorithm>

#include <vector>

#include <set>



using namespace std;



int main()

{

    int n;

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

    {

        set <int> st;

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

        {

            int x;

            scanf("%d",&x);

            auto iter=st.find(x);

            if(iter==st.end())

                st.insert(x);

            else

                st.erase(iter);

        }

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

    }

    return 0;

}

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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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



using namespace std;



map<int,int> mm;



int main(){



    int n;

    scanf("%d",&n);

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

        int x;

        scanf("%d",&x);

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

            mm.erase(x);

        }else{

            mm[x]=1;

        }

    }

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

    return 0;

}


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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

using namespace std;

const int MAX = 10005;

typedef long long ll;

vector<int> vec;

int n, m;

int arr[MAX];

map<int, int>mp;

int main(){

//	freopen("aa.txt","r",stdin);

	cin >> n;

	int ans = 0;

//	memset(arr, 0, sizeof(arr));

	int a;

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

		cin >> a;

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

			mp[a]++;

			if(mp[a] == 1) ans++;

			else {

				mp[a] = 0;

				ans--;

			}

		}else{

			mp[a] = 1;

			ans++;

		}

	}

	cout << ans << endl;

	return 0;

}

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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include <string>

#include <vector>

#include <map>

using namespace std;

int main() {

	int cnt = 0;

	int n, t;

	scanf("%d", &n);

	map<int, bool> m;

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

		scanf("%d", &t);

		if (m[t] == false) {

			m[t] = true;

			cnt++;

		} else {

			m[t] = false;

			cnt--;

		}

	}

	printf("%d", cnt);

}

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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include<algorithm>

#include<map>

using namespace std;

#define MAXN 1005

map<int,int> A;

int main(){

	int n;

	cin>>n;

	while(n--){

		int tmp;

		cin>>tmp;

		A[tmp]++;

	}

	int num=0;

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

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

			num++;

	}

	cout<<num;

	return 0;

}

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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include <algorithm>

#include <cstring>

#include <iostream>

#include <cstdio>

#include <ctype.h>

#include <string>

#include <vector>

#include <map>

#include <set>

#include <unordered_map>

#define INF 0x3fffffff

#define DEBUG 1

#define MAXSIZE 100005

using namespace std;

typedef long long LL;



map<int, bool> mapp;

int main() {

	int n;

	scanf("%d", &n);

	int num = 0;

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

		int a;

		scanf("%d", &a);

		if (mapp.count(a) == 0 || mapp[a] == false) {

			num++;

			mapp[a] = true;

		}

		else {

			num--;

			mapp[a] = false;

		}

	}

	printf("%d", num);

	printf("\n");

	return 0;

}

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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include<vector>

#include<set>

using namespace std; 

set<int> table;

int main(){

	int n;

	scanf("%d",&n);

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

		int temp;

		bool flag = true;

		scanf("%d",&temp);

		set<int>::iterator it;

		//find

		it = table.find(temp);

		if(it==table.end()) table.insert(temp);

		else table.erase(it); 

	} 

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

	return 0; 

} 

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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include <stdio.h>

#include <set>

#define MAXSIZE 100010

using namespace std;

long long a[MAXSIZE];

set<long long> st;



int main()

{

    int n;

    int num = 0;

    set<long long>::iterator it;

    cin>>n;

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

    {

        cin>>a[i];

        it = st.find(a[i]);

        if(it == st.end())

        {

            st.insert(a[i]);

            num++;

        }

        else

        {

            st.erase(a[i]);

            num--;

        }

    }

    cout<<num<<endl;

    return 0;

}


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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include <stdio.h>

#include <math.h>

#include <algorithm>

#include <string>

#include <map>

#include <queue>

#include <vector>

#include <string.h>

using namespace std;

map<string,int>mp;

int main()

{

    int n;

    scanf("%d",&n);

    int cnt = 0;

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

        string c;

        cin>>c;

        if (mp.find(c)==mp.end()){

            cnt++;

            mp[c] = 1;

        }

        else {

            cnt--;

            mp.erase(c);

        }

    }

    printf("%d",cnt);

	return 0;

}


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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	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.239097193080695x):
#include <stdio.h>

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include <set>

using namespace std; 

int main(){

	set<int> st;

	int n,a,count=0;

	scanf("%d",&n);

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

		scanf("%d",&a);

		if(st.count(a)==0){

			st.insert(a);

			count++;

		}else{

			st.erase(a);

			count--;

		}

			

	}

	printf("%d",count);

	return 0; 

}

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

#include <algorithm>

using namespace std;

int main()

{

	int n;

	scanf("%d",&n);

	int num[n];

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

	{

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

	}

	sort(num,num+n);

	int ans=0;

	int k=0;

	while(k<n)

	{

		int count=0;

		int last=num[k];

		while(k<n&&num[k]==last)

		{

			count++;

			k++;

		}

		ans+=count%2;

	}

	printf("%d",ans);

	return 0;

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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

	memset(a,0,sizeof(a));

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

	{

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

	}

	sort(a,a+n);

	int x=0;

	for(int j=0;j<n;)

	{

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

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

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

#include <algorithm>

#include <stdio.h>

#include <string.h>

using namespace std;

int main()

{

    int n,b=0;

    scanf("%d",&n);

    int a[100005];

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

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

    sort(a,a+n);

    a[n]=0;

   // int b[100005];

    //memset(b,true,sizeof(b));

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

    {

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

      {

          i+=2;

          continue;

      }

      b++;

      i++;

    }

    printf("%d",b);

    return 0;

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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

	memset(a,0,sizeof(a));

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

	{

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

	}

	sort(a,a+n);

	int x=0;

	for(int j=0;j<n;)

	{

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

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

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

#include <stdio.h>

#include <set>

#include <string.h>

using namespace std;

int main()

{

    int n;

    scanf("%d",&n);

    set<int>s;

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

    {

        int x;

        cin>>x;

        if(s.count(x))

        {

            s.erase(x);

        }

        else s.insert(x);

    }

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

    return 0;

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

#include <set>

using namespace std;



int main() {

    int n;

    int res = 0;

    cin >> n;

    set< int > s;

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

        int a;

        cin >> a;

        decltype(s)::iterator it = s.find(a);

        if (it != s.end()) {

            s.erase(a);

        } else {

            s.insert(a);

        }

    }

    cout << s.size();

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

}
// Slower C++ solution:
// skyrim belongs to the nords

#include<bits/stdc++.h>

#define mp make_pair

#define pb push_back 

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

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

#define dec(i, a, b) for (int (i) = (a); (i) >= (b); (i)--)

#define clr(a,v) memset(a, v, sizeof(a))

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

#define LOGN 18

#define EPS 1e-8

#define fcin ios_base::sync_with_stdio(false)

using namespace std;

typedef long long ll;

typedef double ld;

typedef pair<int,int> pii;

typedef vector<int> vi;



bool loc[100005];

set<int> sit;

int main(){

	fcin;

	cin.tie(0);

	int N, val;

	cin >> N;

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

		cin >> val;

		if (!sit.count(val)) sit.insert(val);

		else sit.erase(val);

	}

	cout << sit.size();

	return 0;

}

 

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

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

using namespace std;

map<int,int> mp;

int n,ans;

int a[100010];

 int main()

{

	scanf("%d",&n);

	for (int i=1;i<=n;++i) scanf("%d",&a[i]);

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

		if (mp[a[i]]) mp[a[i]]=0;

		else mp[a[i]]=1;

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

		if (mp[a[i]]) ++ans,mp[a[i]]=0;

	printf("%d",ans);

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

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

#include <set>

using namespace std;



int main(void)

{

    int N,x;

    scanf("%d",&N);

    set<int> s;

    while(N--)

    {

        scanf("%d",&x);

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

            s.insert(x);

        else

            s.erase(x);

    }

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

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

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

#include <cstdlib>

#include <cstring>

#include <iostream>

#include <algorithm>

#include <vector>

#include <set>



using namespace std;



int main()

{

    int n;

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

    {

        set <int> st;

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

        {

            int x;

            scanf("%d",&x);

            auto iter=st.find(x);

            if(iter==st.end())

                st.insert(x);

            else

                st.erase(iter);

        }

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

    }

    return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

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



using namespace std;



map<int,int> mm;



int main(){



    int n;

    scanf("%d",&n);

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

        int x;

        scanf("%d",&x);

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

            mm.erase(x);

        }else{

            mm[x]=1;

        }

    }

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

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

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

using namespace std;

const int MAX = 10005;

typedef long long ll;

vector<int> vec;

int n, m;

int arr[MAX];

map<int, int>mp;

int main(){

//	freopen("aa.txt","r",stdin);

	cin >> n;

	int ans = 0;

//	memset(arr, 0, sizeof(arr));

	int a;

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

		cin >> a;

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

			mp[a]++;

			if(mp[a] == 1) ans++;

			else {

				mp[a] = 0;

				ans--;

			}

		}else{

			mp[a] = 1;

			ans++;

		}

	}

	cout << ans << endl;

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

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

#include <string>

#include <vector>

#include <map>

using namespace std;

int main() {

	int cnt = 0;

	int n, t;

	scanf("%d", &n);

	map<int, bool> m;

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

		scanf("%d", &t);

		if (m[t] == false) {

			m[t] = true;

			cnt++;

		} else {

			m[t] = false;

			cnt--;

		}

	}

	printf("%d", cnt);

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

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

#include<algorithm>

#include<map>

using namespace std;

#define MAXN 1005

map<int,int> A;

int main(){

	int n;

	cin>>n;

	while(n--){

		int tmp;

		cin>>tmp;

		A[tmp]++;

	}

	int num=0;

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

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

			num++;

	}

	cout<<num;

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

        scanf("%lld",&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++;

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

    return 0;

}