stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<cmath>

#include<cstring>

using namespace std;

int map[100005];

int main()

{

	int n,sum;

	cin>>n;

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

	{

		cin>>map[i];

	}

	sort(map,map+n);

	int a,ssum=1;

	a=map[0];

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

	{

		if(a==map[i])

		{

			ssum++;

			if(i==n-1)

				sum+=(ssum%2);

		}

		else

		{

			a=map[i];

			sum+=(ssum%2);

			ssum=1;

			if(i==n-1)

				sum++;

		}



	}

	cout<<sum<<endl;

	return 0;

}

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

}

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

using namespace std;

set<int>s;

int a[100010];

int main()

{

	int n;

	scanf("%d",&n);

	int x;

	while(n--)

	{

		scanf("%d",&x);

		if(s.find(x)!=s.end())

		{

			s.erase(x);

		}

		else

		{

			s.insert(x);

		}	

	}

	

	printf("%d",s.size());

	return 0;

 } 

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

}

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

#include <stdio.h>

#include <map>

using namespace std;



int main()

{

    int n,num;

    map<int,int> m;

    map<int,int>::iterator iter;

    scanf("%d",&n);

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

    {

        scanf("%d",&num);

        iter = m.find(num);

        if(iter!=m.end())

            m.erase(num);

        else

            m[num]=1;

    }

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

    return 0;

}


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

}

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

using namespace std;

	string A[100001];

int main()

{

	long long N,total=0;

	cin>>N;

	map<string,bool>number;

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

	{

		cin>>A[i];

		number[A[i]]=false;

	}

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

	{

		if(number[A[i]]==false)

		{

			number[A[i]]=true;

			total+=1;

		}

		else

		{

			number[A[i]]=false;

			total-=1;

		}

	}

	cout<<total<<endl;

}

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

}

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

#include <cstring>

#include <map>

#include <iterator>

using namespace std;



int main()

{

    map<int ,int >q;

    int n;

    cin >> n;

    int sum = 0;

    map<int , int>::iterator it;

    while(n--)

    {

        int temp;

        cin >> temp;

        it = q.find(temp);

        if(it == q.end())

        {

            q[temp] = 1;

            sum++;

        }else{

            if(q[temp]==1)

            {

                q[temp]=0;

                sum--;

            }else{

                q[temp]=1;

                sum++;

            }

        }

    }

    cout << sum << endl;

    return 0;

}


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

}

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

using namespace std;

int main(){

     int N,x;

     cin>>N;

     set<int> st;

     while(N--){

         cin>>x;

        if(st.count(x)){

            st.erase(x);

         }else{

            st.insert(x);

        }

     }

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

     return 0 ;

}

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

}

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

#include <vector>

#include <set>

#include <map>

#include <algorithm>

#include <iostream>

#include <string>

#define  debug	0

#define  MAXN  100010

using namespace std;

int count=0;

int hashTable[MAXN]={0};

map<int,int>id;

int getid(int n)

{	extern int count;

	if(id.find(n) == id.end())

	{	id[n]= count++;

	}

	return id[n];

}

int main()

{				

#if debug 

freopen("data.txt","r",stdin);

#endif

	int N;

	scanf("%d",&N);

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

	{	int number,idd;

		scanf("%d",&number);

		idd = getid(number);

		hashTable[idd] = !hashTable[idd];

	}

	int cnt=0;

	extern int count;

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

	{

		if(hashTable[i])cnt++;

	}

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

}


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

}

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

using namespace std;



struct med{

	int time;

	int value;

	double rate;

}f[11];



int cmp(med a,med b){

	return a.rate>b.rate;

}



int main(){

	/*

	int i,T,N,value=0;

	scanf("%d%d",&T,&N);

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

		scanf("%d%d",&f[i].time,&f[i].value);

		f[i].rate=f[i].value/f[i].time;

	}

	sort(f,f+N,cmp);

	i=0;

	while(i<N){

		if((T-f[i].time)>=0){

			value += f[i].value;

			T -= f[i].time;

		}

		i++;

	}

	printf("%d",value);

	*/

	

	//test3//

	int N,i,count,flag;

	scanf("%d",&N);

	int a[N];

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

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

	}

	sort(a,a+N);

	count = 0;

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

		flag=1;

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

			flag++;

			i++;

		}

		if(flag%2==1){

			count++;

		}

	}

	printf("%d",count);

	//test3//

	

	return 0;

} 

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

}

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

#include<map>

using namespace std;

int main(){

  map<string, bool> mp;

  int n;

  scanf("%d", &n);

  string s;

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

    cin >> s;

    if(mp[s]){

      mp[s] = !mp[s];

    } else {

      mp[s] = true;

    }

  }

  int count = 0;

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

    if(it -> second){

      count ++;

    }

  }

  printf("%d", count);

  return 0; 

}

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

}

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

using namespace std;



#define pb push_back

#define fi first

#define se second

#define mem(x,n) memset(x,n,sizeof(x))

#define sz(x) (int)(x).size()

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

#define foreach(it,l) for(auto it=(l).begin();it!=(l).end();it++)

#define pnl printf("\n")

#define endl '\n'

#define len(x) (x).length()



typedef long long LL;

typedef unsigned long long ULL;

typedef pair<int,int> PII;

typedef pair<LL,LL> PLL;

typedef vector<int> VI;

const double EPS=1e-10;

//const double PI=acos(-1.0);

const int INF=1<<30;

const LL LLINF=1ll<<60;

const int MOD=1e9+7;

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

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



void fastio(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); }



/***********************************\

     _____ _             _

    /  __ \ |           (_)

    | /  \/ | __ _ _ __  _  ___

    | |   | |/ _` | '_ \| |/ _ \

    | \__/\ | (_| | |_) | |  __/

     \____/_|\__,_| .__/|_|\___|

                  | |

                  |_|

\***********************************/



map<int,int> mp;



int main(){

	int tc;

	scanf("%d",&tc);

	while(tc--){

		int x;

		scanf("%d",&x);

		mp[x]++;

	}

	int cnt=0;

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

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

	}

	cout<<cnt<<endl;

	return 0;

}


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

}

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

typedef long long ll;

#define pb push_back

#define mp make_pair

#define fi first

#define se second

using namespace std;

ll n,i,ta,has;

map<ll,ll> me;

int main()

{

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

	cin>>n;

	while(n--)

	{

		cin>>ta;

		if(me[ta])

		{

			has--;

			me[ta]=0;

		}

		else

		{

			me[ta]=1;

			has++;

		}

	}

	cout<<has<<"\n";

}

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

}

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

using namespace std;

int n,ans,x;

map < int , bool > mp;

int main()

{

	scanf("%d",&n);

	while(n--)

	{

		scanf("%d",&x);

		if(mp[x])

		{

			ans--;

			mp[x] = 0;

		}

		else

		{

			ans++;

			mp[x] = 1;

		}

	}

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

	return 0;

}

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

}

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



using namespace std;



#define SCD(t) scanf("%d",&t)

#define SCLD(t) scanf("%ld",&t)

#define SCLLD(t) scanf("%lld",&t)

#define SCC(t) scanf("%c",&t)

#define SCS(t) scanf("%s",t)

#define SCF(t) scanf("%f",&t)

#define SCLF(t) scanf("%lf",&t)

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

#define FOR(i, j, k, in) for (int i=j ; i<k ; i+=in)

#define RFOR(i, j, k, in) for (int i=j ; i>=k ; i-=in)

#define REP(i, j) FOR(i, 0, j, 1)

#define RREP(i, j) RFOR(i, j, 0, 1)

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

#define rall(cont) cont.end(), cont.begin()

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair

#define PB push_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795

#define MOD 1000000007

#define read(type) readInt<type>()

const double pi=acos(-1.0);

typedef pair<int, int> PII;

typedef vector<int> VI;

typedef vector<string> VS;

typedef vector<PII> VII;

typedef vector<VI> VVI;

typedef map<int,int> MPII;

typedef set<int> SETI;

typedef multiset<int> MSETI;

typedef long int int32;

typedef unsigned long int uint32;

typedef long long int int64;

typedef unsigned long long int  uint64;



int n,a,ret=0;

map<int,int> m;



int main()

{

	ios_base::sync_with_stdio(false);

    cin.tie(NULL); cout.tie(NULL);

    cin>>n;

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

		cin>>a;

		if(m[a]==0) {

			m[a]++;

			ret++;

		}

		else {

			m[a]--;

			ret--;

		}

	}

	cout<<ret<<endl;

}

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

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
//Littleboy123 Template 1.1



#include <bits/stdc++.h>

using namespace std;



//pragmas

/*

#pragma comment(linker, "/stack:200000000")

#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#pragma GCC target ("avx2")

#pragma GCC optimization ("O3")

#pragma GCC optimization ("unroll-loops")

*/



typedef pair<int, int> ii;

typedef vector<int> vi;

typedef vector<ii> vii;

typedef long long int ll;

typedef unsigned long long int ull;

typedef long double ld;



#define FOR(a,b,c) for(ll (a)=(b);(a)<(c);++(a))

#define FORE(a,b,c) for(ll (a)=(b);(a)<=(c);++(a))

#define FORN(a,b,c) for(ll (a)=(b);(a)>(c);--(a))

#define FORNE(a,b,c) for(ll (a)=(b);(a)>=(c);--(a))

#define COUT(a) cout << (a) << '\n'

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

#define MAX(a,b) (a) = max((a), (b))

#define MIN(a,b) (a) = min((a), (b))

#define nl '\n'

#define fi first

#define se second

#define mp make_pair

#define pb push_back

#define pi acos(-1.0)



void init(){

	ios_base::sync_with_stdio(false);

	cin.tie(NULL);

	cout.tie(NULL);

}



//End of template



int main(){

	init();



	//debug

	/*

	ifstream in("input.in");

	streambuf *cinbuf = std::cin.rdbuf();

	cin.rdbuf(in.rdbuf());



	ofstream out("out.txt");

	streambuf *coutbuf = std::cout.rdbuf();

	cout.rdbuf(out.rdbuf());

	*/

	//end debug



	int n;

	cin >> n;

	int count = 0;

	int y;

	map<int, int> ada;

	FOR(i, 0, n){

		cin >> y;

		if(ada[y] == 0){

			ada[y]++;

			count++;

		}

		else{

			ada[y]--;

			count--;

		}

	}

	cout << count << nl;

	return 0;

}

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

}

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

using namespace std;

typedef long long ll;

ll arr[(int)1e6+5];

int main(){

	int n;

	scanf("%d",&n);

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

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

	}

	sort(arr,arr+n);

	ll ans=1;

	bool exist=true;

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

		if(arr[i]!=arr[i-1]){

			exist=true;

			ans++;

		}

		

		else{

			if(exist==1){

				ans--;

			}

			

			else{

				ans++;

			}

			exist^=1;

			

		}

	}

	

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

	

	

}

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

}

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

using namespace std;

map <int, int> x;

int main() {

	int n, a, ans=0;

	scanf("%d", &n);

	while(n--) {

		scanf("%d", &a);

		x[a]++;

	}

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

		if(it->second % 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;

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;

}

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

using namespace std;



typedef long long ll;



ll a[100010];



int main() {

	

	ios_base::sync_with_stdio(false);

	cin.tie(NULL);



	ll n;

	cin>>n;



	for(ll i=0;i<n;i++) cin>>a[i];



	sort(a, a+n);



	ll ans = 0;



	ll cnt = 1;

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

		if(a[i] == a[i-1]) cnt++;

		else {

			ans += cnt % 2;

			cnt = 1;

		}

	}

	ans += cnt % 2;



	cout<<ans<<endl;

	

}

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

}

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

#include <algorithm>

#include <vector>

#include <list>

#include <climits>

#include <queue>

#include <string>

#include <map>

#include <stack>

#include <cmath>

#include <regex>

#include<ctime>

#include<set>

using namespace std;

int main()

{

ios::sync_with_stdio(false);

int n;

cin>>n;

set<int> s;

while(n--)

{

    int t;

    cin>>t;

    auto it=s.find(t);

    if(it!=s.end())

        s.erase(t);

    else

        s.insert(t);

}

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

}


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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

// Fastest known solution for this problem: