stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#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 ;



}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;	

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
//    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;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}






// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}




// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <stdio.h>

#include <set>

#include <string.h>

using namespace std;

int main()

{

    int n;

    scanf("%d",&n);

    set<int>s;

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

    {

        int x;

        cin>>x;

        if(s.count(x))

        {

            s.erase(x);

        }

        else s.insert(x);

    }

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

    return 0;

}


// Optimized solution to the same problem (faster):
#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;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <cstdlib>

#include <iostream>

#include <fstream>

#include <sstream>

#include <set>

#include <map>

#include <vector>

#include <list>

#include <algorithm>

#include <cstring>

#include <cmath>

#include <string>

#include <queue>

#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic

#include <cassert>

#include <iomanip>        //do setprecision

#include <ctime>

#include <complex>

using namespace std;



#define FOR(i,b,e) for(int i=(b);i<(e);++i)

#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)

#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)

#define REP(x, n) for(int x = 0; x < (n); ++x)



#define ST first

#define ND second

#define PB push_back

#define MP make_pair

#define LL long long

#define ULL unsigned LL

#define LD long double



const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;

const int mod=1000000007;



int main(){

	int n,c=0;

	int a[101010]={};

	cin>>n;

	FOR(i,0,n){

		cin>>a[i];

	}

	int now=-1,r=0;

	sort(a,a+n);

	FOR(i,0,n){

		if(now==a[i]){

			r^=1;

		}else{

			c+=r;

			now=a[i];

			r=1;

		}

		//cout<<" "<<r<<endl;

	}

	c+=r;

	cout<<c<<endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cstdlib>

#include <iostream>

#include <fstream>

#include <sstream>

#include <set>

#include <map>

#include <vector>

#include <list>

#include <algorithm>

#include <cstring>

#include <cmath>

#include <string>

#include <queue>

#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic

#include <cassert>

#include <iomanip>        //do setprecision

#include <ctime>

#include <complex>

using namespace std;



#define FOR(i,b,e) for(int i=(b);i<(e);++i)

#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)

#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)

#define REP(x, n) for(int x = 0; x < (n); ++x)



#define ST first

#define ND second

#define PB push_back

#define MP make_pair

#define LL long long

#define ULL unsigned LL

#define LD long double



const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;

const int mod=1000000007;



int main(){

	int n,c=0;

	map<int,int> mp;

	cin>>n;

	FOR(i,0,n){

		int b;

		cin>>b;

		if(mp[b]==0){

			mp[b]++;

			c++;

		}else{

			mp[b]--;

			c--;

		}

	}

	

	cout<<c<<endl;

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

map <int,int> Map;

int main(){

    int n,a,ans=0;

    cin>>n;

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

        cin>>a;

        if(Map[a]==0)Map[a]=1,ans++;

        else Map[a]=0,ans--;

    }

    cout<<ans<<endl;

    return 0;

 } 

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int a[100010];

int tmp;

int n,ans=1;

int main(){

	scanf("%d",&n);

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

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

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

	tmp=a[1];

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

		if(tmp==a[i]){

			--ans;

			tmp=-1;

		}

		else{

			++ans;

			tmp=a[i];

		}

	}

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

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <stdio.h>

#include <map>



typedef long long ll;

using namespace std;

map<ll,int> paper;



int main(){

	int N;

	scanf("%d",&N);	

	ll t;

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

		scanf("%lld",&t);	

		paper[t] += 1;

	}

	int ans = 0;

	map<ll,int>::iterator i;

	for(i = paper.begin(); i != paper.end(); i++){

		ans += (*i).second % 2;

	}

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

}


// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <algorithm>



typedef long long ll;

ll map[100000];

using namespace std;



int main(){

	int N;

	scanf("%d",&N);	

	for(int i = 0; i < N; i++) scanf("%lld",map+i);	

	sort(map,map+N);

	int i = 0;

	int ans = 0;

	while(i < N){

		int j = i;

		while(map[j] == map[i] && j < N) j++;

		ans += (j-i)%2;

		i = j;

	}

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

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<stdio.h>

#include<set>

using std::set;



int n;

set<int> S;



int main(void){

	int n;

	scanf("%d",&n);

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

		scanf("%d",&temp);

		if(S.find(temp)!=S.end())

			S.erase(temp);

		else

			S.insert(temp);

	}

	return printf("%d\n",S.size()),0;

}

// Optimized solution to the same problem (faster):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long n,a[100005],z,zs;

int main(){

    cin>>n;

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

        cin>>a[i];

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

    z=1;

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

        if(a[i]==a[i-1]) z=(z+1)%2;

        else{ zs+=z; z=1;}

    zs+=z%2;

    cout<<zs<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long sum;

set<int>s;

int main()

{

	int n,ai;

	cin>>n;

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

	{

		cin>>ai;

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

			s.insert(ai);

		else

			s.erase(ai);

	}

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

	return 0;

}

// Optimized solution to the same problem (faster):
#include<algorithm>

#include<cstdio>

using namespace std;

int a[100000],n,t,ans;

int main()

{

  scanf("%d",&n);

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

  sort(a,a+n);a[n]=2100000000;

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

  {

    ++t;

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

	{

	  if(t%2==1)++ans;

	  t=0;

	}

  }

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

  return 0;

}

// Fastest known solution for this problem: