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

#include<map>

using namespace std;

int main()

{

	int n,l,v=0;

	map<int,int>s;

	scanf("%d",&n);

	while(n--)

	{

		scanf("%d",&l);

		if(!s[l]) s[l]++,v++;

		else s[l]--,v--;

	}

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

	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):
// luogu-judger-enable-o2

#include<bits/stdc++.h>

using namespace std;

long long n,a[100002],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;

    }

    if(z%2)

        zs++;

    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 n,a[100002],z=1,ans=0;

int main()

{

    cin>>n;

    for(int i=1;i<=n;i++)cin>>a[i];

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

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

    {

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

		{

			z=(z+1)%2;

		}

        else

		{

			ans+=z;

			z=1;

		}

    }

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

    cout<<ans<<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;

int main()

{

    int n;

    cin>>n;

    set <int> s;

    while(n--)

    {

        int x;

        cin>>x;

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

            s.erase(x);

        else

            s.insert(x);

    }

    cout<<s.size();

    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;

int a[1000010];

long long ans,n;

int main(void)

{

	cin>>n;

	for(int i=1;i<=n;i++) cin>>a[i];

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

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

		if(a[i]==a[i+1]) ans+=2,i+=2;

			else i++;

	cout<<n-ans<<"\n";

	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;

int main()

{

    int i, t;

    long long c=0;

    cin>>t;

    long long n;

    //vector <long long> a(1000000000);

    map<long long, bool> mp;

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

    {

        cin>>n;

        if(mp.count(n)==0)

        {

            mp[n]=1;

            c=c+1;

        }

        else{



            if(mp[n]==1)

            {

                c--;

                mp[n]=0;

            }

            else if(mp[n]==0)

            {

                mp[n]=1;

                c++;

            }

        }

    }

    cout<<c;



}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

#include<set>



using namespace std; 



int main(){

    set<int> st;

    int N;

    cin >> N;

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

        int in;

        cin >> in;

        if(st.find(in)!=st.end()){

            st.erase(in);

        }else{

            st.insert(in);

        }

    }

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

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

#include <cstdlib>

#include <cmath>

#include <cstring>

#include <string>

#include <algorithm>

#include <iostream>

#include <iomanip>

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

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

#define LL long long

using namespace std ;

inline int read() {

	int x = 0 , f = 1 ;

	char ch = getchar() ;

	while(ch<'0'||ch>'9') { if(ch=='-') f = -1 ; ch = getchar() ; }

	while(ch>='0'&&ch<='9') { x = x * 10+ch-48 ; ch = getchar() ; }

	return x * f ;

}



const int N = 1e5+11;

int n,sum,tot;

int a[N];



int main() {

	n=read(); 

	For(i, 1, n) a[i]=read();

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

	a[0] = a[1]-1;

	For(i, 1, n) 

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

		else {

			if(sum&1) tot++;

			sum = 1;

		}

	if(sum&1) tot++;

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

}
















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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    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;

    map<string,int>m;

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

        string s;

        cin>>s;

        m[s]++;

    }

    int ans=0;

    for(auto x:m){

        if(x.second%2)ans++;

    }

    cout<<ans<<endl;

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

using namespace std;

typedef long long ll;





int main()

{

    int n;

    while(cin>>n)

    {

        set<int>S;

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

        {

            int x;

            scanf("%d",&x);

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

            else S.insert(x);

        }

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

    }

    return 0;

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

#include<string.h>

#include<set>

#include<algorithm>

using namespace std;

set<int>st;

int main()

{

    int t;

    cin>>t;

    while(t--)

    {

        int u;

        cin>>u;

        if(st.find(u)!=st.end())

        {

            st.erase(u);

        }

        else

           st.insert(u);

    }

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

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

using namespace std;

int main(){

  int n;

  scanf("%d",&n);

  set<int>a;

  int temp;

  int sum=0;

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

    scanf("%d",&temp);

    if(a.find(temp)!=a.end()){

        sum--;

        a.erase(temp);

    }

    else{

        sum++;

        a.insert(temp);

    }

  }

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

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
//#define LOCAL

#define INPUT

#include <cstdio>

#include <cstring>

#include <algorithm>

#include <vector>

#define MAXSIZE 10010





#include <map>



using std::map;



int main(){

    #ifdef LOCAL

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

    #endif



    int n = 0;

    scanf("%d", &n);



    map<int, int> imap;

    int ii;

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

        scanf("%d", &ii);

        imap[ii]++;

    }

    int res = 0;

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

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

            res++;

        }

    }

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







    return 0;



}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

#include<map>

#include<iostream>

using namespace std;

const int maxn = 1000000000;

map<int,int> peo;

int main(){

    int n;

    scanf("%d",&n);

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

        int temp;

        cin>>temp;

        if(peo.find(temp) == peo.end()){

            peo[temp] = 1;

        }else{

            if(peo[temp] == 1){

                peo[temp] = 0;

            }else if(peo[temp] == 0){

                peo[temp] = 1;

            }

        }

    }

    int ans = 0;

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

        if(it->second == 1) ans++;

    }

    cout<<ans;

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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



using namespace std;



int n,t;

set<int> sets;



int main()

{

    scanf("%d",&n);

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

    {

        scanf("%d",&t);

        if(sets.find(t)==sets.end())

            sets.insert(t);

        else

            sets.erase(t);

    }

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

    return 0;

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

#include<cstring>

#include<iostream>

#include<cmath>

#include<map>

#include<string>

#include<cstring>

#include<algorithm>

using namespace std;



 



int main() {

	int n; 

	map<string, int>mp;

	scanf("%d", &n);

	getchar();

	string str;

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

		getline(cin, str);

		mp[str]++;

	}

	

	int cnt = 0;

	map<string, int>::iterator it;

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

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

			cnt++;

			//printf("%s ", it->first);

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

		}

	}

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

	return 0;

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

#include<set>

using namespace std;

int main(){

	int n,k,num1,num2;

	set<int> st;

	scanf("%d",&n);

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

		scanf("%d",&k);

		num1=st.size();

		st.insert(k);

		num2=st.size();

		if(num1==num2)

		{

			st.erase(k);

		}

	}

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

	return 0;

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

#include <algorithm>

#include <bits/stdc++.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

using namespace std;



int main(int argc, char** argv) {

	int n;

	scanf("%d",&n);

	

	int ren[n];

	int b,k=1;

	int cnt=n;

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

	{

		scanf("%d",&b);

		ren[i]=b;

	}

	

	sort(ren,ren+n);

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

	{

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

		{

			k++;

			i++;

		}

		if(k%2==0) cnt-=k;

		else cnt=cnt-k+1;

		k=1;

	}

	printf("%d",cnt);

	return 0;

}

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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

#include <algorithm>

using namespace std;

int main()

{

    int n,i,j,sum=0,cnt;

    scanf("%d",&n);

    int num[n];

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

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

    sort(num,num+n);

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

    {

        cnt=1;

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

        {

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

            {

                if(num[j]==num[i-1])

                    cnt++;

            }

            sum=sum+cnt%2;

            i=i-1+cnt;

        }

        else

            sum++;

        if(i==n-1)sum++;

    }

    printf("%d",sum);

    return 0;

}


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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


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



using namespace std;



int main(){

	int n;

	double sum = 0;

	string temp;

	cin >> n;

	map<string, double> num;

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

		cin >> temp;

		if(num.find(temp) != num.end()){

			if(num[temp] == 0)

				num[temp] = 1;

			else

				num[temp] = 0;

		}

		else{

			num[temp] = 1;

		}

	}

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

		sum += it -> second;

	}

	cout << sum;

	

	return 0;

} 

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

#include<algorithm>

using namespace std;

int a[1000001] = {0};

int main()

{

    int n;

    scanf("%d",&n);

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

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

    sort(a,a+n);

    int count=0,sum=1;  //sum is same num

    int temp=a[0];

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

    {

        if(a[i]==temp){

            sum++;

            if(i==n-1){

                if(sum%2==0) break;

                else count++;

            }

        }

        else{

            if(sum%2==0){sum=1;}

            else{    //相同的为奇数

                count++;sum=1;

            }

            temp=a[i];

            if(i==n-1)  count++;

        }

    }

    if(n==1)    printf("1");

    else

        printf("%d",count);

    return 0;

}


// Fastest known solution for this problem: