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

#include <set>

using namespace std;

int main()

{

    int n,x;

    scanf("%d",&n);

    set<int> st;

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

    {

       scanf("%d",&x);

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

            st.insert(x);

       else

        st.erase(x);

    }

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

}


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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<cstdlib>

#include<algorithm>

#include<cstring>

using namespace std;



const int maxn = 100010;



int main()

{

	int n;

	int a[maxn];

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

	scanf("%d", &n);

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

	{

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



	}

	sort(a, a + n);

	int num = 0;

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

	{

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

		{

			num++;

		}

		else

			i++;

	}

	printf("%d", num);





	system("pause");

	return 0;



}

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<algorithm>

using namespace std;





int main() {

	int n;

	cin >> n;

	int* x=new int[n];

	int k;

	for (int i = 0; i < n; i++)cin >> x[i];

	sort(x, x + n);

	//for (int i = 0; i < n; i++)cout << x[i];

	k = x[0];

	int num = 1;

	int sum = 0;

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

		if (x[i] == k) {

			num++;

		}

		else {

			if (num % 2)sum++;

			k = x[i];

			num = 1;

		}

	}

	if (num % 2)sum++;

	cout << sum;

	return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<set>

using namespace std;

int main(){

	

	set<int> s;

	int n;

	scanf("%d",&n);

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

		int x;

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<map>

using namespace std;

map<int, bool> m;

int main()

{

	int n,temp,num=0;

	cin >> n;

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

	{

		cin >> temp;

		if (m[temp] == 1)

		{

			m[temp] = 0; num--;

		}

		else

		{

			m[temp] = 1; num++;

		}

	}

	cout << num;

	return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<cstdio>

#include<string>

#include<vector>

#include<algorithm>

#include<set>

using namespace std;



int main()

{

	int n, number;

	cin >> n;

	set<int> s;

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

	{

		cin >> number;

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

		{

			s.insert(number);

		}

		else 

		{

			s.erase(number);

		}

	}

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

	

	

	return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

using namespace std;

int n,input,l;

set<int>total;

int main()

{

    total.clear();

    cin>>n;

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

            l=total.size();

        cin>>input;

        total.insert(input);

        int k=total.size();

        if(l==k){

            total.erase(input);

        }

    }

    cout<<total.size();

    return 0;

}


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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

using namespace std;

const int N = 100001;

struct str{

    long long s,g;

}f[N];

long long n,z,c;

long long a[N];

void chong()

{

    f[1].s=a[1];f[1].g=1;c=1;

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

    {

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

        	f[++c].s=a[i],f[c].g=1;

        else f[c].g++;

    }

}

int main()

{

    cin>>n;

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

		cin>>a[i];

	}

    sort(a+1,a+n+1);

    chong();

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

    	if(f[i].g%2==1){

    		z++;

    	}

    }

    cout<<z<<endl;

    return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include <algorithm>

using namespace std;



const int M = 1e5+10;

int a[M];



int main()

{

	int n;

	cin>>n;

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

		cin>>a[i];

	sort(a,a+n);

	int cnt=0;

	a[n] = a[0]-1;

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

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

			cnt++;

		else

			i++;

	cout<<cnt<<endl;

	return 0;

}


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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<string.h>

#include<cstdio>

#include<map>

using namespace std;





int main(){



   int n, l, r;

   while(cin >> n){

      map<int, int> mp;

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

      int a;

      int cnt = 0;

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

         int a;cin >> a;

         mp[a]++;

         if(mp[a] & 1){

            cnt++;

         }else{

            cnt--;

         }

      }

      cout << cnt <<endl;

   }





   return 0;

}


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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include <set>

using namespace std;



int main(){



    int n;

    set<int> a;

    int x;

    cin >> n;

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

        cin >> x;

        if(!a.insert(x).second)

            a.erase(x);

    }

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

    return 0;

}


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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<algorithm>

#include<map>

using namespace std;

int a[100010];

int main()

{

	int n,i,num=0,k=1;

	cin>>n;

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

	{

		cin>>a[i];

	}

	sort(a,a+n);

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

	{

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

			k=(k+1)%2;

		else

		{

			num+=k;

			k=1;

		}

	}

	if(k%2==1)

	  num+=1;

	cout<<num<<endl;

	return 0;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<iostream>

#include<set>

using namespace std;

typedef long long ll;

set<ll>s;

int main()

{

    int n;

    cin>>n;

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

        ll t;

        cin>>t;

        if(s.count(t))s.erase(s.find(t));

        else s.insert(t);

    }

    cout<<s.size();

    return 0;

}


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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<map>

using namespace std;

map<int,int>mp;

int main()

{

	int n,t,ans=0;

	cin >> n;

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

	{

		cin >> t;

		if(mp[t]==0)

		{

			mp[t]=1;

			ans++;

		}

		else

		{

			mp[t]=0;

			ans--;

		}

	}

	cout << ans;

}

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    return 0;

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

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

#include<algorithm>

using namespace std;

int main()

{

    int n,j=0;

    long long 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;)

    {

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

        {

            i++;

            j++;

        }

        else

            i+=2;

    }

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

    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: 4.676233033994484x):
#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:
#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.299220929857508x):
#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 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: 4.651314175521729x):
#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<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: 4.665954040416851x):
#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 <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: 4.76389984126492x):
#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 <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: 4.6821623168745505x):
#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 <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.324993281394489x):
#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;

}