stablegradients/pie-gem5-pairs huggingface dataset:
// 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: 1.7179627403033044x):
#include<stdio.h>

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    return 0;

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

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[120000];

int b[100000];

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    int s=0,j=0;

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

    {

        b[j]++;

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

        {

            b[j]++;

            i++;

        }

        if(b[j]&1)

            s++;

        j++;

    }

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

    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: 1.3816311435430806x):
#include<iostream>

#include<map> 

#include<algorithm>

using namespace std;

int main()

{

	int n;

	cin>>n;

	map<int,int>m;

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

	{

		int x;

		cin>>x;

		m[x]++;

	}

	int sum=0;

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

	{

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

		sum++;

	}

	cout<<sum;

	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: 1.3823716873933427x):
#include <cstdio>

#include<iostream>

#include<cmath>

#include<queue>

#include<algorithm>

#include<cstring>

#include<string>

#include<vector>

#define MAXN 100003

int a[MAXN];

using namespace std;







int main(){

    int n;

    cin >> n;

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

        cin >> a[i];

    }

    sort(a, a+n);

    int cnt;

    vector<int> vi;

    for(int i=0; i<n-1;){

        int index=i;

        cnt = 1;

        while(a[index]==a[index+1]){

            cnt++;

            index++;

        }

        i = i+cnt;



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

        else vi.push_back(1);

    }

    int ans=0;

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

        if(vi[i] == 1)

            ans++;

    }

    if(a[n-1]!=a[n-2]) ans++;

    cout << 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: 1.3966087822274547x):
#include<iostream>

#include<stdio.h>

#include<cstring>

#include<cmath>

#include<algorithm>

#include<map>

using namespace std;



int main(){

    map<int,int> mp;

    map<int,int>::iterator it;

    int N,a,ans = 0;

    scanf("%d",&N);

    while(N--){

        scanf("%d",&a);

        mp[a] ++;

    }

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

        if(it->second%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: 1.3966604018812725x):
#include<iostream>

#include<cstdio>

#include<algorithm>



using namespace std;

int arr[100005];



int main() {

	int n;

	cin >> n;

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

		cin >> arr[i];

	}

	sort(arr, arr + n);

	int i = 0; 

	int s = n;

	while(i < n - 1 ){

		if (arr[i] == arr[i + 1]) {

			int index = 2;

			while (arr[i + index] == arr[i]) {

				index++;

			}

			if (index % 2 == 0) {

				s -= index;

			}

			else {

				s = s - index + 1;

			}

			i += index;

		}

		else {

			i++;

		}

	}

	cout << s;

	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: 1.380315000717974x):
#include <bits/stdc++.h>

using  namespace std;



#define    ll     long long int



int main( )

{

    int n, i, j;

    map<int, int> mp;

    cin >> n;

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

        cin >> j;

        mp[j]++;

        if (mp[j] == 2) {

            mp.erase(mp.find(j));

        }

    }

    cout << (int) mp.size() << '\n';

    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: 1.3898724025948481x):
#include<bits/stdc++.h>

using namespace std;

    map<int,int>mp;

int main()

{

 long long   int n,k,a,b,mx=0,sum=0,f=0,c=0;

    cin>>n;

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

    {

        cin>>a;

        if(mp[a]==0){mp[a]=1;c++;}

        else if(mp[a]==1){c--; mp[a]=0;}

    }

    cout<<c<<endl;



}
// 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: 1.3816767603328592x):
#include<iostream>

#include<cstdio>

#include<string>

#include<vector>

#include<queue>

#include<cmath>

#include<algorithm>

#include<iomanip>

#include<functional>

#include<set>

#include<map>

#include<utility>

#define ul unsigned long long int

#define ll long long int

#define MAX 1000000+1

using namespace std;

#define F first

#define S second

#define pi 2*acos(0.0)

#define PB push_back

#define LSTAGE 1







int main()

{



    ll n;

    cin >> n;

    map<ll, bool> v;

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

    {

        ll r;

        cin >> r;

        if(v.count(r)==0)

        {

            v[r] = false;

        }



        v[r] = (!v[r]);



    }

    map<ll, bool> :: iterator it;

    ll area = 0;

    ll a= 0, b= 0;

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

    {



//        cout << it->F<<endl;

        if(it->S)

            area++;

    }

    cout << area ;









    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: 1.3916759300932955x):
#include<iostream>

#include<map>

using namespace std;

const int maxn = 100001;

map<int,int> mp;

int count=0;

int main(){

	int n;

	cin>>n;

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

		int temp;

		cin>>temp;

		if(mp.count(temp)==0){

			count++;

			mp[temp]=1;

		}else{

			if(mp[temp]==1){

				count--;

				mp[temp]=0;

			}else{

				mp[temp]=1;

				count++;

			}

		}

	}

	cout<<count;

}