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

#include<math.h>

#include<string.h>

#include<iostream>

#include<algorithm>

#include<vector>

#include<utility>

#include<stack>

#include<queue>

#include<map>



#define se second



using namespace std;



map<int,int> mp;



int main()

{

    //    freopen("input.in", "r", stdin);

    

    int n; cin >> n;

    int hit = 0;

    while(n--)

    {

        int a;

        cin >> a;

        mp[a]++;

    }

    

    

    for(auto x : mp)

        if(x.se&1)

            hit++;

    

    cout << hit << "\n";

}


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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

#define fi first

#define se second

#define pb push_back

#define eb emplace_back

using namespace std;

typedef long long LL;

typedef pair<int,int> pii;

typedef vector<int> vi;



template<class T> inline T re(){

	T N = 0; char c = getchar(); bool neg = 0;

	for (; c < '0' || c > '9'; c = getchar()) neg |= c == '-';

	for (; c >= '0' && c <= '9'; c = getchar())

		N = (N<<3)+(N<<1) + c - '0';

	return neg ? -N : N;

}



int n;

set<int> s;



int main(){

	n = re<int>();

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

		int u = re<int>();

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

			s.erase(u);

		} else {

			s.insert(u);

		}

	}

	cout << s.size() << '\n';

	return 0;

}


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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

#include <stdio.h>

#include <string.h>

#include <set>

using namespace std;

int main()

{

    int n;

    scanf("%d",&n);

    set<int>st;

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

    {

        int x;

        cin>>x;

        if(st.count(x))

        {

            st.erase(x);

        }

        else

            st.insert(x);

    }

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

    return 0;

}

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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

#include <iostream>

#include <algorithm>

using namespace std;

int a[100005];

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;



}

                      


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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

#include <stdio.h>

#include <algorithm>

#include <string.h>

int a[100005];

using namespace std;

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int s=0;

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

    {

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

        {

            i=i+2;

        }

        else

        {

            s++;

            i++;

        }

    }

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

    return 0;

}




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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

#include<set>

#include<string.h>

#include<iostream>

using namespace std;

int main() {

	int n;

	scanf("%d",&n);

	set<int>st;

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

		int x;;

		cin>>x;

		if(st.count(x))

		{

			st.erase(x);

		}

		else 

		st.insert(x);

	}

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

	return 0;

}

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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

#include<iostream>

#include<algorithm>



using namespace std;



int main(){

	int n;

	cin>>n;

	int a[100001]={};

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

		cin>>a[i];

	}

	sort(a,a+n);

	int count=0,m=1;

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

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

			if(m%2==1) count++;

			m=1;

		}

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

			m++;

		}

	}

	if(m%2==1) count++;

	cout<<count;

	

	return 0;

}

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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
////////////////////////// Author

////////////////////////// Nasim Hossain Rabbi

////////////////////////// JU-CSE28

////////////////////////// CF - imnasim3.1415

////////////////////////// UVA - imnasim3.1415

////////////////////////// Mail - imnasim3.1415@gmail.com

#include<bits/stdc++.h>

using namespace std;

#define sz size()

#define mk make_pair

#define clr clear()

#define B begin()

#define E end()

#define EM empty()

#define mem(a,b) memset(a,b,sizeof(a))

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

#define Rep(i,n) for(i=1;i<=n;i++)

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

#define pb push_back

#define endl '\n'

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

#define pi 3.1415926535897932384626433832795

#define vi vector<int>

#define vl vector<long long>

#define vs vector<string>

#define vp(vi,x) cin>>x; vi.pb(x);

typedef long long LL;

typedef unsigned long long ULL;

template<typename T>

 T gcd(T a,T b)

{

    return b==0?a:gcd(b,a%b);

}

template<typename T>

 T lcm(T a,T b)

{

    LL g=gcd(a,b);

    return (a/g)*b;

}

int main()

{

//    fast;

    int i,j,k,n,m,l,s=0,y,tc=1;

    while(cin>>n)

    {

        LL x,c=1,cc=0;

        vl a;

        rep(i,n)

        {

            vp(a,x);

        }

        sort(all(a));

        rep(i,n-1)

        {

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

            else

            {

                if(c%2==1 || c==0) cc++;

                c=1;

            }

        }

        if(c%2==1 || c==0) cc++;

        cout<<cc<<endl;

    }

}




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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

using namespace std;

#define ll long long

int main()

{

    ll n,i,j,k,l,a,b,c;

     map<ll,ll>mp;

    cin>>n;

    c=0;

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

    {

        cin>>k;

        if(mp[k]>0)

        {

            mp[k]--;

            c--;

        }

        else if(mp[k]==0)

        {

            mp[k]++;

            c++;

        }

    }

    cout<<c<<endl;

    return 0;

}


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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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



#define ll long long int

using namespace std;

int main()

{

   ll n,l,r,count=0;

   map<int,int>m;

   cin>>n;

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

   {

       cin>>l;

       m[l]++;

       if(m[l]==2)

       {

           count++;

           m[l]=0;

       }



   }

   cout<<n-(2*count)<<endl;

   m.clear();

    return 0;

}


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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

#include <cstdio>

#include <string>

#include <algorithm>

#include <map>

using namespace std;



int main()

{

    int N;

    while(cin>>N){

        map<int,int> m;

        int num;

        int sum=0;

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

            cin>>num;

            if(m[num]==0){

                sum++;

                m[num]=1;

            }

            else if(m[num]==1){

                sum--;

                m[num]=0;

            }

        }

        cout<<sum<<endl;

    }

    return 0;

}

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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

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

#include<iostream>

#include<algorithm>



using namespace std;



int main(){

	int n;

	cin>>n;

	int a[100001]={};

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

		cin>>a[i];

	}

	sort(a,a+n);

	int count=0,m=1;

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

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

			if(m%2==1) count++;

			m=1;

		}

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

			m++;

		}

	}

	if(m%2==1) count++;

	cout<<count;

	

	return 0;

}

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



using namespace std;



int main()

{

    long long int n, a, i, cnt;

    set<long long int> s;

    set<long long int>::iterator itr;

    cin >> n;

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

        cin >> a;

        itr= s.find(a);

        if(itr== s.end()){

            s.insert(a);

        } else {

            s.erase(a);

        }



    }



    cout << s.size();

    return 0;

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

#include<iostream>

#include<algorithm>



using namespace std;



int main(){

	int n;

	cin>>n;

	int a[100001]={};

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

		cin>>a[i];

	}

	sort(a,a+n);

	int count=0,m=1;

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

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

			if(m%2==1) count++;

			m=1;

		}

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

			m++;

		}

	}

	if(m%2==1) count++;

	cout<<count;

	

	return 0;

}

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



using namespace std;



int main()

{

    long long int n, a, i, cnt;

    set<long long int> s;

    set<long long int>::iterator it;

    cin >> n;

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

    {

        cin >> a;                    //coded BY Shoaib......

        it= s.find(a);

        if(it== s.end())

        {

            s.insert(a);

        }

        else

        {

            s.erase(a);

        }



    }



    cout << s.size();

    return 0;

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

#include<iostream>

#include<algorithm>



using namespace std;



int main(){

	int n;

	cin>>n;

	int a[100001]={};

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

		cin>>a[i];

	}

	sort(a,a+n);

	int count=0,m=1;

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

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

			if(m%2==1) count++;

			m=1;

		}

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

			m++;

		}

	}

	if(m%2==1) count++;

	cout<<count;

	

	return 0;

}

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

#include<set>



using namespace std;



int main()

{

    long long int i, j, a, b, c, n;

    set<int> s;



    cin >> n;

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

    {

        cin >> a;



        if(s.count(a))

            s.erase(a);

        else

            s.insert(a);



    }

    cout << s.size();

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

#include<iostream>

#include<algorithm>



using namespace std;



int main(){

	int n;

	cin>>n;

	int a[100001]={};

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

		cin>>a[i];

	}

	sort(a,a+n);

	int count=0,m=1;

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

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

			if(m%2==1) count++;

			m=1;

		}

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

			m++;

		}

	}

	if(m%2==1) count++;

	cout<<count;

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.365130274796328x):
#include<iostream>   //AA06( 15/ 07/ 20) If u see my code, Have a Good Day! (^_^)

#include<set>

#include<iterator>

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

#define endl "\n"



using namespace std;



int main()

{

    JonSnow;



    int n, A;



    set <int> S;



    set <int> :: iterator I;



    cin >> n;



    while(n--) {



        cin >> A;



        I = S.find(A);



        if (I == S.end()) {



            S.insert(A);



        }



        else {



            S.erase(A);



        }



    }



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



    return 0;

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

#include<iostream>

#include<algorithm>



using namespace std;



int main(){

	int n;

	cin>>n;

	int a[100001]={};

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

		cin>>a[i];

	}

	sort(a,a+n);

	int count=0,m=1;

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

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

			if(m%2==1) count++;

			m=1;

		}

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

			m++;

		}

	}

	if(m%2==1) count++;

	cout<<count;

	

	return 0;

}

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

using namespace std;



typedef long long ll;



#define pb push_back

#define mp make_pair

#define f first

#define s second

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



const int maxn = 200010;

const int MOD = 1e9+7;

const int INF = 1e9;

const ll LINF = 1e18;

ll n, m, a[maxn];

map<int, int> M, N;

set<int> S;

string s;



void solve()

{

    cin >> n;

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

    {

        cin >> a[i];

        M[a[i]]++;

    }

    int cnt=0;

    for(auto u : M)

        if(u.second%2)cnt++;

    cout << cnt;

}

//1212135 34343434343

int main()

{

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

    int t=1; //cin >> t;

    while(t--) solve();

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

#include <set>

using namespace std;

int n, a, s;

set<int> st;

int main() {

	scanf("%d", &n);

	while(n--) {

		scanf("%d", &a);

		if(st.count(a)) st.erase(a);

		else st.insert(a);

	}

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

	return 0;

}

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

#include <algorithm>

using namespace std;

int n, s, a[100005];

int main() {

	int i, j;

	scanf("%d", &n);

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

	sort(a, a+n);

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

		for(j=i; j<n && a[j]==a[i]; j++);

		s += (j-i)%2;

	}

	printf("%d", s);

	return 0;

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

#include <set>

using namespace std;



int n, a;

set<int> st;

int main() {

	scanf("%d", &n);

	while(n--) {

		scanf("%d", &a);

		if(st.count(a)) st.erase(a);

		else st.insert(a);

	}

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

	return 0;

}

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

#include <algorithm>

using namespace std;

int n, s, a[100005];

int main() {

	int i, j;

	scanf("%d", &n);

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

	sort(a, a+n);

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

		for(j=i; j<n && a[j]==a[i]; j++);

		s += (j-i)%2;

	}

	printf("%d", s);

	return 0;

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

#include <map>

using namespace std;

int n, a, s;

map<int,int> mp;

int main() {

	scanf("%d", &n);

	while(n--) {

		scanf("%d", &a);

		(mp[a]^=1) ? ++s : --s;

	}

	printf("%d", s);

	return 0;

}

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

#include <algorithm>

using namespace std;

int n, s, a[100005];

int main() {

	int i, j;

	scanf("%d", &n);

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

	sort(a, a+n);

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

		for(j=i; j<n && a[j]==a[i]; j++);

		s += (j-i)%2;

	}

	printf("%d", s);

	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.281282267573718x):
#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:
// 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.308826888516218x):
#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;

}