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

using namespace std;

int n;

map<int,int> mp;

int main(){

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

        mp.clear();

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

            int id;

            scanf("%d",&id);

            if(!mp.count(id)){

                mp[id] = 1;

            }

            else{

                mp[id] = mp[id] ^ 1;

            }

        }

        int ans = 0;

        for(auto it : mp){

            if(it.second == 1) ans++;

        }

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

    }

    return 0;

}


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

#include<string.h>

#include<algorithm>

#define ll long long

using namespace std;

int main()

{

    int n,j=0,m=0,h=0;

    ll a[100005];

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

        h=0;

        j=i;

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

        {

            h++;

            j++;

        };

        if(h%2==1)

            m++;

    }

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

    return 0;

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

#include<string.h>

#include<algorithm>

#define ll long long

using namespace std;

int main()

{

    int n,j=0,m=0,h=0;

    ll a[100005];

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

        h=0;

        j=i;

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

        {

            h++;

            j++;

        };

        if(h%2==1)

            m++;

    }

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

    return 0;

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

#include<string.h>

#include<algorithm>

#define ll long long

using namespace std;

int main()

{

    int n,j=0,m=0,h=0;

    ll a[100005];

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

        h=0;

        j=i;

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

        {

            h++;

            j++;

        };

        if(h%2==1)

            m++;

    }

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

    return 0;

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

#include<string.h>

#include<algorithm>

#define ll long long

using namespace std;

int main()

{

    int n,j=0,m=0,h=0;

    ll a[100005];

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

        h=0;

        j=i;

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

        {

            h++;

            j++;

        };

        if(h%2==1)

            m++;

    }

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

    return 0;

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

#include<string.h>

#include<algorithm>

#define ll long long

using namespace std;

int main()

{

    int n,j=0,m=0,h=0;

    ll a[100005];

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

        h=0;

        j=i;

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

        {

            h++;

            j++;

        };

        if(h%2==1)

            m++;

    }

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

    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.3805304544249708x):
////////////////////////// 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;

    }

}
// 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.3828608801969242x):
#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;

}
// 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.3831278670772387x):
#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;

}
// 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.381405824003951x):
#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;

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

#include<algorithm>

using namespace std;



int *n;

int ans=0;

int N,i;



int main(){

	cin>>N;

	n=new int[N];

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

		cin>>n[i];

	}



	sort(n,n+N);



	while(i<N){

		int cnt=0,next=n[i];

		while(i<N && n[i]==next){

			cnt++;

			i++;

		}

		ans+=cnt%2;

	}



	cout<<ans<<endl;

	delete[]n;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.242819102879791x):
#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:
#pragma GCC optimize("O2")

#pragma G++ optimize("O2")

#include<cstdio>

#include<algorithm>

#include<map>

#define ll long long

#define For(i,x,y)  for(ll i=x;i<=y;++i)

#define FOr(i,x,y)  for(ll i=x;i>=y;--i)

#define lf else if

using namespace std;

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

inline void write(ll x){    if (x<0) putchar('-'),x=-x; if (x>=10) write(x/10);   putchar(x%10+'0');  } 

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

map<ll,ll>mp;

ll n,ans;

int main(){

	n=read();

	For(i,1,n){

		ll x=read();

		if (mp[x])	mp[x]^=1,ans--;

		else	mp[x]^=1,ans++;

	}writeln(ans);

}

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

#define N 2005

#define oo 1000000000

#define zyy 1000000007

#define For(i,x,y) for(int i=x;i<=y;i++)

#define Rep(i,x,y) for(int i=x;i>=y;i--)

#define Forn(i,x,y) for(int i=x;i<y;i++)

using namespace std;

inline int read(){

	int x=0,f=0;char ch=getchar();

	for(;ch<'0'||ch>'9';ch=getchar()) if(ch=='-') f=1;

	for(;ch>='0'&&ch<='9';ch=getchar()) x=(x<<1)+(x<<3)+ch-48;

	return f?-x:x;

}

set<int> s;

int n;

int main(){

	n=read();

	For(i,1,n){

		int x=read();

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

		else s.erase(x);

	}

	cout<<s.size();

	return 0;

}

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

using namespace std;



int main()

{

	map<int, bool> mp;

	int n;

	scanf("%d",&n);

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

	{

		int temp;

		scanf("%d", &temp);

		if (mp[temp])

			mp.erase(temp);

		else

			mp[temp] = true;



	}

	cout << mp.size();

	return EXIT_SUCCESS;

}

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

#include <vector>

#include <list>

#include <climits>

#include <queue>

#include <string>

#include <map>

#include <stack>

#include <cmath>

#include <regex>

#include<ctime>

#include<set>

using namespace std;

int main()

{

ios::sync_with_stdio(false);

int n;

cin>>n;

set<int> s;

while(n--)

{

    int t;

    cin>>t;

    auto it=s.find(t);

    if(it!=s.end())

        s.erase(t);

    else

        s.insert(t);

}

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

}


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

using namespace std;



int main(void){

	int n;

	scanf("%d",&n);

	set<long long> ss;

	long long cnt;

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

		cin>>cnt;

		if(ss.find(cnt)!=ss.end()) ss.erase(cnt);

		else ss.insert(cnt);

	}

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

	return 0;

}

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

using namespace std;



map<long long, bool> mp;

int main()

{

	int n, cnt = 0;

	long long id;

	scanf("%d", &n);

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

	{ 

		scanf("%lld", &id);

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

		{

			mp[id] = true;

			cnt++;

		}

		else

		{

			if (mp[id] == true)

			{

				mp[id] = false;

				cnt--;

			}

			else

			{

				mp[id] = true;

				cnt++;

			}

		}

	}

	printf("%d", cnt);

	return 0;

}

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

#include <cmath> 

#include <string> 

#include <vector> 

#include <set>   

#include <map>

#include <queue> 

#include <stack> 

#include <algorithm> 



using namespace std;



int main(int argc,char* argv[])

{

    int N;

    map<string,int> mp;

    string str;

    scanf("%d",&N);

   

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

    {

        cin>>str;

        if(mp[str]==0)

          mp[str] = 1;

        else

          mp[str] = 0;

    }

    

    map<string,int>::iterator it = mp.begin();

    int cnt = 0;

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

    {

    	if(it->second!=0)

    	  cnt++;

    }

    

    printf("%d",cnt);

	return 0;

}




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

#include<cstdio>

#include<cstring>

#include<algorithm>

#include<set> 

#include<stack>

using namespace std;



map<int,int> mp;

int main(){

int n;

cin>>n;

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

{   int temp;

    cin>>temp;

	if(mp.find(temp)==mp.end())

    mp[temp]=1;

    else if(mp[temp]==0)

    mp[temp]=1;

    else if(mp[temp]==1)

    mp[temp]=0; 

}

int count=0;

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

{

	if(it->second==1)

	count++; 

}

cout<<count;

return 0;

}

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

using namespace std;



int main(){

	int n,a,num=0;

	set<int> s;

	scanf("%d",&n);

	while(n--){

		scanf("%d",&a);

		if(s.count(a)!=0){

			s.erase(a);

			num--;

		}

		else{

			s.insert(a);

			num++;

		}

	}

	printf("%d",num);

	return 0;

	system("pause");

}

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

#include <algorithm>

using namespace std;







int main()

{

	map<int, int> record;

	int n;

	int x;

	cin >> n;

	while (n--)

	{

		cin >> x;

		if (record[x] == 0)

			record[x] = 1;

		else

			record[x] = 0;

	}

	int k = 0;

	for (auto it : record)

	{

		if (it.second == 1)

			k++;

	}

	cout << k << endl;

}


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

}