stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#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;

 } 

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

using namespace std;

#define LL long long int

#define DL double

#define MLL map<LL,LL>::iterator

#define MSL map<string,L>::iterator

#define MLS map<LL,string>::iterator

#define MSS map<string,string>::iterator

#define MCL map<char,LL>::iterator

#define SL set<LL>::iterator

#define SS set<string>::iterator sl

#define G getline

#define SZ size()

#define IN insert

#define C clear()

#define B begin()

#define F front()

#define T top()

#define E end()

#define EM empty()

#define V vector

#define Q queue

#define DQ deque

#define PQ priority_queue

#define ST stack

#define FI first

#define SE second

#define PI acos(-1)

#define PS push

#define PP pop()

#define PSF push_front

#define PSB push_back

#define PPF pop_front()

#define PPB pop_back()

#define endl "\n"

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

V<LL>v;

map<LL,LL>u;

int main()

{

    FAST;

    LL n,m,i,j,k,p,q,o,l,s,t,z;

    string a;

   cin>>n;

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

   {

       cin>>o;

       u[o]++;

   }

   for(MLL it=u.B;it!=u.E;it++)

   {

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

       {

           k++;

       }

   }

   cout<<k<<endl;



    return 0;



}
// Slower C++ solution:
#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;

}


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

using namespace std;

#define LL long long int

#define DL double

#define MLL map<LL,LL>::iterator

#define MSL map<string,L>::iterator

#define MLS map<LL,string>::iterator

#define MSS map<string,string>::iterator

#define MCL map<char,LL>::iterator

#define SL set<LL>::iterator

#define SS set<string>::iterator sl

#define G getline

#define SZ size()

#define IN insert

#define C clear()

#define B begin()

#define F front()

#define T top()

#define E end()

#define EM empty()

#define V vector

#define Q queue

#define DQ deque

#define PQ priority_queue

#define ST stack

#define FI first

#define SE second

#define PI acos(-1)

#define PS push

#define PP pop()

#define PSF push_front

#define PSB push_back

#define PPF pop_front()

#define PPB pop_back()

#define endl "\n"

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

V<LL>v;

map<LL,LL>u;

int main()

{

    FAST;

    LL n,m,i,j,k,p,q,o,l,s,t,z;

    string a;

   cin>>n;

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

   {

       cin>>o;

       u[o]++;

   }

   for(MLL it=u.B;it!=u.E;it++)

   {

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

       {

           k++;

       }

   }

   cout<<k<<endl;



    return 0;



}
// Slower C++ solution:
#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;

 } 

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

using namespace std;

set<int>s;

int main()

{

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

    int i,n,l,r;

    cin>>n;

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

    {

        cin>>l;

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

        {

            s.insert(l);

        }

        else

        {

            s.erase(l);

        }

    }

    cout<<(int)s.size()<<"\n";

    return 0;

}
// Slower C++ solution:
#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;

}


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

using namespace std;

set<int>s;

int main()

{

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

    int i,n,l,r;

    cin>>n;

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

    {

        cin>>l;

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

        {

            s.insert(l);

        }

        else

        {

            s.erase(l);

        }

    }

    cout<<(int)s.size()<<"\n";

    return 0;

}
// Slower C++ solution:
#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;

 } 

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

#include<cstdio>

#include<cstring>

#include<cstdlib>

#include<algorithm>

#include<string>

#include<stdio.h>

#include<stack>

#include<cmath>

#include<set>

//#define ll long long

using namespace std;

const int maxn=100010;

const int INF=1000000000;

set<int> st;



int main()

{

    int n,i,j,k,a,b;

    cin>>n;

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

    {

        cin>>a;

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

            st.insert(a);

        else

            st.erase(a);

    }

    cout<<st.size();

    return 0;

}
// Slower C++ solution:
#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;

}


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

#include<cstdio>

#include<cstring>

#include<cstdlib>

#include<algorithm>

#include<string>

#include<stdio.h>

#include<stack>

#include<cmath>

#include<set>

//#define ll long long

using namespace std;

const int maxn=100010;

const int INF=1000000000;

set<int> st;



int main()

{

    int n,i,j,k,a,b;

    cin>>n;

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

    {

        cin>>a;

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

            st.insert(a);

        else

            st.erase(a);

    }

    cout<<st.size();

    return 0;

}
// Slower C++ solution:
#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;

 } 

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

#define MAXN 105

using namespace std;







int main(void)

{

    int N;

    cin >> N;

    int a[N];

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

        cin >> a[i];

    }

    sort(a, a+N);

    vector<int> vi;

    int cnt,cur;

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

        cnt = 0;

        cur = a[i];

        while(i < N && a[i] == cur){

            cnt++;

            i++;

        }

        if(cnt%2==1) vi.push_back(1);





    }

    cout << vi.size();

    return 0;

}
// Slower C++ solution:
#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;

}


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

#define MAXN 105

using namespace std;







int main(void)

{

    int N;

    cin >> N;

    int a[N];

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

        cin >> a[i];

    }

    sort(a, a+N);

    vector<int> vi;

    int cnt,cur;

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

        cnt = 0;

        cur = a[i];

        while(i < N && a[i] == cur){

            cnt++;

            i++;

        }

        if(cnt%2==1) vi.push_back(1);





    }

    cout << vi.size();

    return 0;

}
// Slower C++ solution:
#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;

 } 

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

#include <vector>

using namespace std;



int main()

{

    long int N;

    cin >> N;



    vector <long int> vec;

    long int input;



    for(long int n=0; n<N; n++)

    {

        cin >> input;

        vec.push_back(input);

    }



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



    for(long int i=1; i<vec.size(); i++)

    {

        if(vec[i] == vec[i-1])

        {

            vec.erase(vec.begin() + (i - 1));

            vec.erase(vec.begin() + (i - 1));



            i--;

        }

    }



    cout << vec.size();

    return 0;

}
// Slower C++ solution:
#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;

}


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

#include <vector>

using namespace std;



int main()

{

    long int N;

    cin >> N;



    vector <long int> vec;

    long int input;



    for(long int n=0; n<N; n++)

    {

        cin >> input;

        vec.push_back(input);

    }



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



    for(long int i=1; i<vec.size(); i++)

    {

        if(vec[i] == vec[i-1])

        {

            vec.erase(vec.begin() + (i - 1));

            vec.erase(vec.begin() + (i - 1));



            i--;

        }

    }



    cout << vec.size();

    return 0;

}
// Slower C++ solution:
#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;

 } 

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

using namespace std;



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

#define ll long long

#define inf 1e18

#define pi acos(-1.0)

#define mod 998244353



map<ll,ll>m;

map<ll,ll>:: iterator it;



int main(void)

{

    fastio;



    ll n,a,ans=0;

    cin >> n;

    while(n--)

    {

        cin >> a;

        m[a]++;

    }

    for(it=m.begin();it!=m.end();it++)

    {

        if((it->second)%2)ans++;

    }

    cout << ans ;



    return 0;

}
// Slower C++ solution:
#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;

}


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

using namespace std;



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

#define ll long long

#define inf 1e18

#define pi acos(-1.0)

#define mod 998244353



map<ll,ll>m;

map<ll,ll>:: iterator it;



int main(void)

{

    fastio;



    ll n,a,ans=0;

    cin >> n;

    while(n--)

    {

        cin >> a;

        m[a]++;

    }

    for(it=m.begin();it!=m.end();it++)

    {

        if((it->second)%2)ans++;

    }

    cout << ans ;



    return 0;

}
// Slower C++ solution:
#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;

 } 

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

}
// Slower C++ solution:
#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;

}


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

}
// Slower C++ solution:
#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;

}

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

#include<stdio.h>

#include<string.h>

#include<math.h>

using namespace std;

int main()

{

    int n,a[100001];

    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; i++)

    {

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

       {

           a[i]=a[i+1]=0;

           f+=2;

           i=i+1;

       }

    }

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

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include<stdio.h>

#include<string.h>

#include<math.h>

using namespace std;

int main()

{

    int n,a[100001];

    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; i++)

    {

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

       {

           a[i]=a[i+1]=0;

           f+=2;

           i=i+1;

       }

    }

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

    return 0;

}
// Slower C++ solution:
#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);

}

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

#include<stdio.h>

#include<string.h>

#include<math.h>

using namespace std;

int main()

{

    int n,a[100001];

    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; i++)

    {

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

       {

           a[i]=a[i+1]=0;

           f+=2;

           i=i+1;

       }

    }

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

    return 0;

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

#include<cstdio>

#include<cstring>

#include<algorithm>

#define ll long long

#define N 100005

#define inf (1ll<<60)

#define rep(i,j,k) for (ll i=j;i<=k;++i)

#define per(i,j,k) for (ll i=j;i>=k;--i)

using namespace std;

inline ll read(){

	char ch=getchar(); ll x=0,f=1;

	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;

}

ll n,ans;

map<ll,bool> mp;

int main(){

	n=read();

	rep(i,1,n){

		ll x=read();

		if (mp[x]){

			--ans; mp[x]=0;

		}else{

			++ans; mp[x]=1;

		}

	}

	printf("%lld",ans);

}

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

#include<stdio.h>

#include<string.h>

#include<math.h>

using namespace std;

int main()

{

    int n,a[100001];

    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; i++)

    {

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

       {

           a[i]=a[i+1]=0;

           f+=2;

           i=i+1;

       }

    }

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

    return 0;

}