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

#include <string>

#include <string.h>

#include <algorithm>

#include <vector>

#include <set>

#include <map>

#include <queue>

using namespace std;

const int maxn = 200010;

int n;

map<int,int> mp;

int cnt = 0;

int main(){

	cin >> n;

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

		int a;

		cin >> a;

		if(mp[a]%2==0){

			cnt++;

		}else{

			cnt--;

		}

		mp[a]++;

	}

	cout << cnt << endl;

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

#include<map>

using namespace std;

int main()

{



    int N,x;

    scanf("%d",&N);

    map<int,int> mp;

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

    {

        scanf("%d",&x);

        mp[x]++;

    }

    int k=0;

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

        if(it->second%2!=0)

            k++;

    }

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

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

using namespace std;



const int N=1e5 +3;

int a[N];

map<int, int> mp;



int main(){



    int n;

    scanf("%d", &n);

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

        scanf("%d", a+i);

        ++mp[a[i]];

        --mp[a[i]];



        mp[a[i]] = !mp[a[i]];

    }



    int cnt=0;

    for(auto i:mp){

        if(i.second==1)

            ++cnt;

    }



    printf("%d", cnt);







    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

}
// Slower C++ solution:




/*@author hussein zayed ;

    ___  ___

   |\  \|\  \

   \ \  \_\  \

    \ \   ___ \USSEIN

     \ \  \\ \ \

      \ \__\\ \_\

       \|__| \|__|

****************************************

*/



#include <bits/stdc++.h>

using namespace std;

#define fr for(int i=0;i<n;++i)

#define fr1 for(int i=1;i<=n;++i)

#define cinA for(int i=0;i<n;++i){cin>>arr[i];}

#define cinA1 for(int i=1;i<=n;++i){cin>>arr[i];}

#define coutA for(int i=0;i<n;++i){cout<<arr[i]<<" ";}

#define ll long long

#define lnarray sizeof(arr)/sizeof(*arr)

#define vi vector<int>

#define vs vector<string>

void Fast()

{

    ios_base :: sync_with_stdio( 0 ) ;

    cin.tie( 0 ) ;

    cout.tie( 0 ) ;

}

inline int RD()

{

    int i ;

    cin>>i;

    return i;

}



inline float RF()

{

    float i ;

    cin>>i;

    return i;

}



inline double RDO()

{

    double i ;

    cin>>i;

    return i;

}



inline string RS()

{

    string i ;

    cin>>i;

    return i;

}



inline ll RLL()

{

    ll i ;

    cin>>i;

    return i;

}



int cm[200000];



ll sumSet(ll n)

{

    return (1ll*n*(n+1))/2;

}

string s;





bool isPrime(int n)

{

    if(n==1)

        return false;

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

    {

        if(n%i==0)

            return false;

    }

    return true;

}

int sumDigit(int n){

int sum =0;

  while (n != 0)

    {

        sum+= + n % 10;

        n = n / 10;

    }

    return sum;

}



ll power2(int n){

  ll ans=(1<<n);

  return ans;

}



ll sumpow2(ll n){

 ll sum=(n*(n+1)*(2*n-1))/6;

 return sum;

}



int main(){

    Fast();

//freopen("output.txt" , "w" , stdout);

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

 int n=RD();



    map<int, int> m;

     fr{

        int tmp=RD();

        m[tmp]++;

    }

    int cnt = 0;

    for(auto i : m) {

        if(i.second % 2 == 1) {

            cnt++;

        }

    }

    cout << cnt << endl;

    return 0;

 }






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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

using namespace std;

//*******************

// Mahmoud Magdy    *

//*******************

#define ll long long

#define endl "\n"



void fast()

{

    ios_base :: sync_with_stdio( 0 ) ;

    cin.tie( 0 ) ;

    cout.tie( 0 ) ;

}

inline int D()

{

    int m ;

    cin>>m;

    return m ;

}

inline ll lD()

{

    ll m ;

    cin>>m;

    return m ;

}

inline double dD()

{

    double m ;

    cin>>m;

    return m ;

}

ll arr[1000006];

map<int,int>fr;

int main()

{

int n=D();

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

    cin>>arr[i];

    fr[arr[i]]++;

}

set<int>st;

vector<int>v;

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

{

    if(!(st.count(arr[i])))

    {

        v.push_back(arr[i]);

        st.insert(arr[i]);

    }

}

int c=0;

for(int i=0;i<v.size();++i){

    if(fr[v[i]]%2)

        c++;

}

cout<<c<<endl;

}




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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

#define ll long long

#define endl "\n"

using namespace std ;

const int N = 1e7 + 4;

void FastInputOutput()

{

    ios_base :: sync_with_stdio( 0 ) ;

    cin.tie( 0 ) ;

    cout.tie( 0 ) ;

}

inline ll LLD()

{

    ll ret;

    scanf("%lld", &ret);

    return ret;

}

inline int D()

{

    int ret;

    scanf("%d", &ret);

    return ret;

}

void bin( int x )

{

    if(!x)

        return;

    bin( x / 2 );

    cout << x % 2 ;

}

bool checkPrimeNumber(int n)

{

    bool flag = true;

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

    {

        if (n % j == 0)

        {

            flag = false;

            break;

        }

    }

    return flag;

}

bool cmp(string last, string first)

{

    if(last.size() < first.size())

        return 1;

    return 0;

}

int calculateDigit(int n)

{

    double temp = (double)(n);

    double a = 0.39908-(0.434294 * n);

    double b = log10( n ) ;

    double c = ( n + 0.5 ) * b ;

    double ans = c - abs( a ) ;

    return ceil(ans) ;

}

int findDigits(int n)

{

    double E = 2.71828182845904523536;

    double PI = 3.141592654;



    if (n < 0)

        return 0;

    if (n <= 1)

        return 1;



    double x = ((n * log10(n / E) +

                 log10(2.0 * PI * n) /

                 2.0));



    return floor(x) + 1;

}

ll fact(ll n)

{

    ll ans = 1 ;

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

        ans *= i ;

    return ans ;

}



int arr[ N ];

int main()

{

    FastInputOutput() ;

    int n ;

    map < int, int > mp ;

    cin >> n ;

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

    {

        cin >> arr[ i ] ;

        ++mp[arr[ i ]] ;

    }

    int cnt = 0 ;

    map < int, int > ::iterator it ;

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

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

            ++cnt ;

    cout << cnt << endl ;



}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

using namespace std;



set<int> ada;

int n;



int main(){

	scanf("%d",&n);

	while(n--){

		int x;

		scanf("%d",&x);

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

		else ada.erase(x);

	}

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

	return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

 

#pragma GCC optimize("O2")

using namespace std;

#define ll long long

#define ull unsigned long long

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

#define rap(i,n,N) for(ll i=n;i>=N;--i)

#define pb push_back

#define pob pop_back

#define pf push_front

#define pof pop_front

#define fi first

#define se second

#define ff fi.fi

#define fs fi.se

#define sf se.fi

#define ss se.se

#define lc (id<<1)

#define rc ((id<<1)|1)

#define db(x) cout << ">>>>>> " << #x << " -> " << x << endl;

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

#define pii pair<int,int> 

#define pll pair<ll,ll>

#define piii pair<int,pii>

#define plll pair<ll,pii>

#define piiii pair<pii,pii>

#define psi pair<string,int>

//#define endl "\n"

const int MAX = 1e3+5;

const ll MAX2 = 11;

const ll MOD = 1000000007;

const ll INF = 1e18;

const int dr[]={1,0,-1,0,1,1,-1,-1,0};

const int dc[]={0,1,0,-1,1,-1,1,-1,0};

const double pi = acos(-1);

const double EPS = 1e-9;

const int block = 450;



int n,x;

set<int> s;



int main(){

//	cout<<fixed<<setprecision(15);

//    freopen("output.txt", "r", stdin);

//	freopen("output.txt","w",stdout);

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

    cin>>n;

    while(n--){

    	cin>>x;

    	if(s.count(x))s.erase(x);

    	else s.insert(x);

	}

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

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

using namespace std;

#define fi first

#define se second

#define pb push_back

#define mp make_pair

#define fr front()

#define tp top()

typedef long long int ll;

typedef long double ld;

typedef pair <int, int> pii;

typedef pair <pii, int> ppi;

typedef pair <int, pii> pip;

#define iofast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)

#define iofile freopen("input.txt","r",stdin),freopen("output.txt","w",stdout)

const ll LLINF = 1e18;

const int INF = 1e9;

const int MOD = 1e9 + 7;

const double EPS = 1e-10;

const double PI = acos(-1);

const int SIZE = 100005;



int N;

int A[SIZE];

map<int,int> Mp;	



int main (){

	

	scanf("%d", &N);

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

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

		Mp[A[i]]++;

	}

	int ans=0;

	for(map<int,int>::iterator itm=Mp.begin();itm!=Mp.end();itm++){

		if(itm->se%2==1) ans++;

	}

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

	

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

#include <map>

#include <set>

using namespace std;



int main(){

	map<int,bool> a;

	int N,ans=0;

	cin>>N;

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

		int inp;

		cin>>inp;

		if(a[inp]){

			a[inp]=false;

			ans--;

		}else{

			a[inp]=true;

			ans++;

		}

	}

	cout<<ans<<"\n";

	

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

using namespace std;



#define ll long long



ll n,a,cnt;

map <ll, ll> mm;

int main()

{

	cin>>n;

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

	{

		cin>>a;

		mm[a]++;

	}

	for(auto i: mm)

	{

		if(i.second%2==1) cnt++;

	}

	cout<<cnt<<endl;

	return 0;	

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

using namespace std;



int main()

{

    long long n;

    cin >> n;

    map<long long,long long>mp;

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

    {

        long long a;

        cin >> a;

        mp[a]++;

        if(mp[a]!=1)

        {

            mp[a]=0;

        }

    }

    map<long long,long long>::iterator it;

    long long res =0;

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

    {

        if(it->second==1)

        {

         //   cout << it->first << ' ';

            res ++;

        }

    }

    cout << res << '\n';

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

using namespace std;

int main()

{

    int n;

    cin>>n;

    set<long long>st;

    while(n--)

    {

        int num;

        cin>>num;

        if(st.find(num)!=st.end())st.erase(num);

        else

            st.insert(num);

    }

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

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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



using namespace std;



int main()

{

    map<int, int> mp;

    int n, x;

    int c = 0;



    cin >> n;



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

    {

        cin >> x;

        mp[x]++;

    }



    for (auto itr = mp.begin(); itr != mp.end(); itr++)

    {

        if (itr->second % 2 == 1)

            c++;

    }

    cout << c << endl;

    return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

}
// Slower C++ solution:
//    https://youtu.be/N3oCS85HvpY



#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef long double ld;

typedef long long unsigned llu;

typedef pair<long long, long long> pll;

const long long inf = 2000000000000000000LL;	// 2e18

#define pi                  acos(-1.0)

#define fast                ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define shesh               "\n"

#define ff                  first

#define ss                  second

#define pb                  push_back

#define bp                  pop_back

#define pf                  push_front

#define fp                  pop_front

#define ub                  upper_bound

#define lb                  lower_bound

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

#define debug(x)            cout<<"debug "<<x<<"\n"

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



int main(){

    fast;

    ll t,n,m,i,j,k,temp,flag,ans=0;

    cin>>n;

    map<ll,ll>mp;

    while(n--){

        cin>>temp;

        mp[temp]++;

    }

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

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

    }

    cout<<ans;

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

#include<string.h>

#include<stdlib.h>

#include<math.h>

#include<algorithm>

#include<iostream>

#include<set>

using namespace std;

/*int a[100005],b[100005];

bool com(int a,int b)

{

    return a<b;

}

int cz(int x[],int n,int key)

{

    int low=0;

    int high=n-1;

    while(low<=high)

    {

        int mid=(low+high)/2;

        int midval=x[mid];

        if(midval<key)

            low=mid+1;

        else if(midval>key)

            high=mid-1;

        else

            return mid;

    }

    return -1;

}

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n,com);

    int p=0;

    int j=0;

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

    {

        memset(b,0,sizeof(b));

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

        {

            b[k]=a[k];

        }

        for(int k=j; k<n-1; k++)

        {

            b[k]=a[k+1];

        }

        int f=a[j],rav;

        rav=cz(b,n-1,f);

        if(rav!=-1)

            p++;

        j++;

    }

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

    return 0;

}*/

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

#include<stdio.h>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int n;

	int a[100005];

	scanf("%d",&n);

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

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

	{

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

	}

	sort(a,a+n);

	int x=0;

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

	{

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

		{

		x+=0;

		j+=2;

	}

		else

		{

			j+=1;

			x++;

		}



	}

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

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

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

#include <algorithm>

#include <stdio.h>

#include <string.h>

using namespace std;

int main()

{

    int n,b=0;

    scanf("%d",&n);

    int a[100005];

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

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

    sort(a,a+n);

    a[n]=0;

   // int b[100005];

    //memset(b,true,sizeof(b));

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

    {

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

      {

          i+=2;

          continue;

      }

      b++;

      i++;

    }

    printf("%d",b);

    return 0;

}




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

#include<string.h>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

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

            x=(x+1)%2;

        else

        {

            ans+=x;

            x=1;

        }

    }

    if(x%2)

        ans++;

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

    return 0;

}