stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <cstdio>

#include <set>

using namespace std;

int main(){

    set<int> st;

    int n,x;

    scanf("%d",&n);

    while(n--){

        scanf("%d",&x);

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

            st.insert(x);

        else st.erase(x);

    }

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

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <cstring>

#include <algorithm>

#include <set>

using namespace std;

int main(){

    set<int> st;

    int n,x;

    scanf("%d",&n);

    while(n--){

        scanf("%d",&x);

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

            st.insert(x);

        else st.erase(x);

    }

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

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <set>

using namespace std;



int main()

{

    set<int> s;

    int n,i,sum=0;

    cin>>n;

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

    {

        int x;

        cin>>x;

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

            s.insert(x);

        else s.erase(x);

    }

    sum=s.size();

    cout<<sum<<endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include "iostream"

#include "map"

using namespace std;



int main()

{

	int n;

	map<int,int> m;

	int count=0;

	cin>>n;

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

	{

		int num;

		cin>>num;

		if(m[num]==0)

		{

			m[num]=1;

			count++;

		}

			

		else

		{

			m[num]=0;

			count--;

		}

	}

	cout<<count<<endl;

	system("pause");

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string.h>

#include<algorithm>

using namespace std;

#include<set>

#pragma warning(disable:4996)

set<int> s;

void zaichangnei() {

	int N = 0;

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

		s.clear();

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

			int tmp = 0;

			scanf("%d", &tmp);

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

			else s.erase(tmp);

		}

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

	}

}

int main() {

	//baixianguo();

	//diancai();

	zaichangnei();

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<cstring>

#include<vector>

#include<map> 

using namespace std;

typedef long long ll;

const int mmax=1e9+10;

map<ll,ll> book1;

int main()

{

	ll n;

	while(cin>>n)

	{	

		ll ans=0;

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

		{

			ll a;

			cin>>a;

			if(book1[a]==1)

			{

				book1[a]--;

				ans--;	

			}	

			else if(book1[a]==0)

			{

				book1[a]++;

				ans++;

			}

		}

		cout<<ans<<endl;

	}

	return 0;

 } 

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstdio>

#include <map>

using namespace std;

map<int,int> mp;

map<int,int>::iterator it;

int main(){

	int n,a;

	scanf("%d",&n);

	while(n--){

		scanf("%d",&a);

		mp[a]++;

	}

	int ans=0;

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

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

			ans++;

		}

	}

	cout<<ans;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

ll v[100010];

ll ans[100010]={};

ll y[100010];

int main(){

    ios::sync_with_stdio(false);

    cin.tie(0);

    cout.tie(0);

    ll n;

    cin>>n;

    ll N=n;

    ll tot=0;

    while(N--){

        ll x;

        cin>>x;

        y[tot]=x;

        v[tot++]=x;

    }

    sort(v,v+tot);

    ll cnt=unique(v,v+tot)-v;

    for(ll i=0;i<tot;++i){

        ll pos=lower_bound(v,v+cnt,y[i])-v;

        ans[pos]++;

    }

    ll res=0;

    for(ll i=0;i<cnt;++i){

        if(ans[i]&1)

            res++;

    }

    cout<<res<<endl;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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(){

	

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

} 

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int main() {

	int cnt = 0,n,a;

	map<int,bool> mp;

	cin>>n;

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

		cin>>a;

		if(mp[a]) {

			mp[a] = 0;

			cnt--;

		} else {

			mp[a] = 1;

			cnt++;

		}

	}

	cout<<cnt<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#pragma GCC optimize("Ofast")

#pragma GCC optimize("unroll-loops")

#pragma GCC optimize ("-ffloat-store") // to restrict undesirable precision

#pragma GCC optimize ("-fno-defer-pop")// to pop argument of function as soon as it returns

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

#define ll long long int

#define ld long double

ll power(ll a,ll b,ll m){ if(b==0) return 1; if(b==1) return a%m; ll t=power(a,b/2,m)%m; t=(t*t)%m; if(b&1) t=((t%m)*(a%m))%m; return t;}

ll modInverse(ll a, ll m) { return power(a, m-2, m); }

#define ps push_back

#define fs first

#define takeline cin.ignore();

#define sc second

#define N 3000005

#define endl "\n"

#define mod 1000000007

//((1.0l)*BIG MULTIPLY MAGIC?)

// string to integer stoi()

// string to long long stoll()

// string.substr(position,length);

// integer to string to_string();

//-----------------------------------------------

int main(){

	

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

	

	ll i,j,k,l,n;

	cin>>n;



	set<ll> st;

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

		cin>>k;

		if(st.find(k)!=st.end()){

			st.erase(st.find(k));

		}

		else st.insert(k);

	}

	cout<<st.size();

	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#define NL            "\n"

#define _SAD()        ios::sync_with_stdio(0),cin.tie(0), cout.tie(0);

#define SZ(s)         s.size()

#define SRT(x,y)      sort(x,x+y)

#define REV(a,b)      reverse(a,a+b)

#define VSRT(x)       sort(x.begin(),x.end())

#define VREV(x)       reverse(x.begin(),x.end())

int main()

{

    _SAD()

    int x,cnt=0;

    cin>>x;

    int a[x];

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

    {

      cin>>a[i];

    }

    SRT(a,x);

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

    {

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

        {

            i++;

        }

        else

        {

            cnt++;

        }

    }

    cout<<cnt<<NL;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cmath>

#include <stdio.h>

#include <algorithm>

#include <string>

#include <vector>

#include <queue>

#include <deque>

#include <stack>

#include <map>

#include <set>

#include <cstring>



using namespace std;



#define f first

#define s second

#define pb push_back

#define mp make_pair

#define ll long long

#define pii pair < int, int >

#define pll pair < long long, long long>

#define ull unsigned long long

#define vi vector < int >

#define vll vector < long long >

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

#define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it++)

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

#define sqr(x) ((x) * (x))

#define fname "searching"



const int inf = (int)1e9;

const ll INF = (ll)1e18;

const double eps = 1e-9;

const double pi = acos(-1.0);

const int mod = (int)1e9 + 7;



int solve(){

    int n;

    cin >> n;

    multiset<int> s;

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

        cin >> x;

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

            s.insert(x);

        else

            s.erase(x);

    }

    return sz(s);

}



int main(){

    ios_base::sync_with_stdio(0);

    cin.tie(0);



    cout << solve() << "\n";

    

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#define ll long long

using namespace std;



int main()

{

    int n;

    scanf("%d",&n);

    int num[100005];

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

        cin>>num[i];

    sort(num,num+n);

    int ans = 0;

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

    {

        int j = i + 1;

        int k = 0;

        while(num[i] == num[j])

        {

            k++;

            j++;

        }

        if(k&1) i = j;

        else

        {

            i = j;

            ans ++ ;

        }

    }

    cout<<ans<<endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<stdio.h>

#include<math.h>

#include<iostream>

#include<string.h>

#include<set>

#include<map>

#include<list>

#include<vector>

#include<algorithm>

#define ll long long

using namespace std;

int  main()

{

    int n,ans=0;

    set<int>qq;

    cin>>n;

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

    {

        int x;

        cin>>x;

        if(qq.find(x)==qq.end())

            qq.insert(x);

        else

            qq.erase(x);

    }

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



    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<stdio.h>

#include<string.h>

#include<algorithm>

#include<iostream>

using namespace std;

int a[100000];

int main()

{

    int n;

    while(~scanf("%d",&n))

    {

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

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

        {

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

        }

        int c=0;

        sort(a,a+n);

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

        {

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

            {

                c+=2;

                i=i+2;

            }

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

            {

                i++;

            }

        }

        printf("%d\n",n-c);

    }

    return 0;

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

#include <string.h>

using namespace std;





int main()

{

    long int n,i,j,k,a=1,count=0;

	scanf("%ld",&n);

	

	vector<long int> v;

	

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

	{

		scanf("%ld",&j);

		v.push_back(j);		

	}

	

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

	

	for(i=0;i<v.size();i=j)

	{

		

		for(j=i+1;j<v.size();j++)	

		{

			if(v[i] == v[j]) a++;

			else break;

		}

		if(a&1) count++;

		a=1;

	}

	

	printf("%ld",count);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <iomanip>

#include <algorithm>

#include <vector>





#define MOD 1000000007

#define INTMAX 0x7fffffff

#define INTMIN 0x80000000

#define LLMAX 0x7fffffffffffffffLL

#define LLMIN 0x8000000000000000LL



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

#define rep(i,n) REP(i,0,n)



using namespace std;

using ll = long long;



int main(){

    vector<int> v;



    int N;

    cin >> N;



    int A;

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

        cin >> A;

        auto it = lower_bound(v.begin(), v.end(), A);

        if (it != v.end() && *it == A) {

            //cout << "erase " << A << endl;

            v.erase(it);

        } else {

            //cout << "insert " << A << endl;

            v.insert(it, A);

        }

        //for (int vi : v) {

        //    cout << vi << ", ";

        //}

        //cout << endl;

    }



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

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#define ll long long

map<int,bool> mp;

int num,n,x;

int main(){

	scanf("%d",&n);

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

		scanf("%d",&x);

		if(mp[x]){

			num--;

			mp[x] = false;

		}

		else{

			num++;

			mp[x] = true;

		}		

	}

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

	return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#define ll long long

inline ll read(){ll x=0,f=1;char ch=getchar();for(;ch<'0'||ch>'9';ch=getchar())if(ch=='-')f=-1;for(;ch>='0'&&ch<='9';ch=getchar())x=x*10+ch-48;return x*f;}

inline void write(ll x){if(x>9)write(x/10);putchar('0'+x%10);}

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

map<int,int>a;

int n,x,ans;

int main()

{

	n=read();

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

		x=read();

		if(a[x]){

			ans--;

			a[x]=0;

		}

		else{

			ans++;

			a[x]=1;

		}

	}

	writeln(ans);

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



}


// Fastest known solution for this problem: