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

#include<algorithm>

#include<cstring>

#include<vector>

#include<map> 

using namespace std;

typedef long long ll;

const int mmax=1e9+10;

map<ll,ll> book1;

int main()

{

	ll n;

	while(cin>>n)

	{	

		ll ans=0;

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

		{

			ll a;

			cin>>a;

			if(book1[a]==1)

			{

				book1[a]--;

				ans--;	

			}	

			else if(book1[a]==0)

			{

				book1[a]++;

				ans++;

			}

		}

		cout<<ans<<endl;

	}

	return 0;

 } 

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

#include <cstdio>

#include <map>

using namespace std;

map<int,int> mp;

map<int,int>::iterator it;

int main(){

	int n,a;

	scanf("%d",&n);

	while(n--){

		scanf("%d",&a);

		mp[a]++;

	}

	int ans=0;

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

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

			ans++;

		}

	}

	cout<<ans;

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

using namespace std;

typedef long long ll;

ll v[100010];

ll ans[100010]={};

ll y[100010];

int main(){

    ios::sync_with_stdio(false);

    cin.tie(0);

    cout.tie(0);

    ll n;

    cin>>n;

    ll N=n;

    ll tot=0;

    while(N--){

        ll x;

        cin>>x;

        y[tot]=x;

        v[tot++]=x;

    }

    sort(v,v+tot);

    ll cnt=unique(v,v+tot)-v;

    for(ll i=0;i<tot;++i){

        ll pos=lower_bound(v,v+cnt,y[i])-v;

        ans[pos]++;

    }

    ll res=0;

    for(ll i=0;i<cnt;++i){

        if(ans[i]&1)

            res++;

    }

    cout<<res<<endl;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

	

	//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;

} 

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

using namespace std;



int main() {

	int cnt = 0,n,a;

	map<int,bool> mp;

	cin>>n;

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

		cin>>a;

		if(mp[a]) {

			mp[a] = 0;

			cnt--;

		} else {

			mp[a] = 1;

			cnt++;

		}

	}

	cout<<cnt<<endl;

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

using namespace std;

#pragma GCC optimize("Ofast")

#pragma GCC optimize("unroll-loops")

#pragma GCC optimize ("-ffloat-store") // to restrict undesirable precision

#pragma GCC optimize ("-fno-defer-pop")// to pop argument of function as soon as it returns

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

#define ll long long int

#define ld long double

ll power(ll a,ll b,ll m){ if(b==0) return 1; if(b==1) return a%m; ll t=power(a,b/2,m)%m; t=(t*t)%m; if(b&1) t=((t%m)*(a%m))%m; return t;}

ll modInverse(ll a, ll m) { return power(a, m-2, m); }

#define ps push_back

#define fs first

#define takeline cin.ignore();

#define sc second

#define N 3000005

#define endl "\n"

#define mod 1000000007

//((1.0l)*BIG MULTIPLY MAGIC?)

// string to integer stoi()

// string to long long stoll()

// string.substr(position,length);

// integer to string to_string();

//-----------------------------------------------

int main(){

	

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

	

	ll i,j,k,l,n;

	cin>>n;



	set<ll> st;

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

		cin>>k;

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

			st.erase(st.find(k));

		}

		else st.insert(k);

	}

	cout<<st.size();

	return 0;

}

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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

using namespace std;

#define NL            "\n"

#define _SAD()        ios::sync_with_stdio(0),cin.tie(0), cout.tie(0);

#define SZ(s)         s.size()

#define SRT(x,y)      sort(x,x+y)

#define REV(a,b)      reverse(a,a+b)

#define VSRT(x)       sort(x.begin(),x.end())

#define VREV(x)       reverse(x.begin(),x.end())

int main()

{

    _SAD()

    int x,cnt=0;

    cin>>x;

    int a[x];

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

    {

      cin>>a[i];

    }

    SRT(a,x);

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

    {

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

        {

            i++;

        }

        else

        {

            cnt++;

        }

    }

    cout<<cnt<<NL;

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

#include <cmath>

#include <stdio.h>

#include <algorithm>

#include <string>

#include <vector>

#include <queue>

#include <deque>

#include <stack>

#include <map>

#include <set>

#include <cstring>



using namespace std;



#define f first

#define s second

#define pb push_back

#define mp make_pair

#define ll long long

#define pii pair < int, int >

#define pll pair < long long, long long>

#define ull unsigned long long

#define vi vector < int >

#define vll vector < long long >

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

#define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it++)

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

#define sqr(x) ((x) * (x))

#define fname "searching"



const int inf = (int)1e9;

const ll INF = (ll)1e18;

const double eps = 1e-9;

const double pi = acos(-1.0);

const int mod = (int)1e9 + 7;



int solve(){

    int n;

    cin >> n;

    multiset<int> s;

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

        cin >> x;

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

            s.insert(x);

        else

            s.erase(x);

    }

    return sz(s);

}



int main(){

    ios_base::sync_with_stdio(0);

    cin.tie(0);



    cout << solve() << "\n";

    

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

#define ll long long

using namespace std;



int main()

{

    int n;

    scanf("%d",&n);

    int num[100005];

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

        cin>>num[i];

    sort(num,num+n);

    int ans = 0;

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

    {

        int j = i + 1;

        int k = 0;

        while(num[i] == num[j])

        {

            k++;

            j++;

        }

        if(k&1) i = j;

        else

        {

            i = j;

            ans ++ ;

        }

    }

    cout<<ans<<endl;

    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

#include<math.h>

#include<iostream>

#include<string.h>

#include<set>

#include<map>

#include<list>

#include<vector>

#include<algorithm>

#define ll long long

using namespace std;

int  main()

{

    int n,ans=0;

    set<int>qq;

    cin>>n;

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

    {

        int x;

        cin>>x;

        if(qq.find(x)==qq.end())

            qq.insert(x);

        else

            qq.erase(x);

    }

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



    return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int a[100010];

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int f=0;

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

    {

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

            i+=2;

        else

        {

            f+=1;

            i++;

        }

    }

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

    return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

#include<string.h>

#include<set>

#include<iostream>

#include<algorithm>

using namespace std;

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;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

// Faster C++ solution for the same problem (measured speedup: 1.4039551625472124x):
#include<iostream>

#include<stdio.h>

#include<string.h>

#include<algorithm>

#include<set>

using namespace std;



int main()

{

	int n;

	while(scanf("%d",&n)!=EOF)

	{

	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());

    	s.clear();



}

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

// Faster C++ solution for the same problem (measured speedup: 1.3994216475642183x):
#include<cstdio>

#include<iostream>

#include<algorithm>

using namespace std;

long long a[1000010];

int main()

{

    int n,x=1,ans=0;//x表示一个数出现的次数，赋值1

    cin>>n;

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

        cin>>a[i];

    sort(a,a+n);//先排序，判断奇偶

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

    {

        if(a[i]==a[i-1])//出现相同的数，x+1然后mod2

            x=(x+1)%2;

        else

        {

            ans+=x;///单独的一个数，ans+1，x重新赋值为1，进行循环

            x=1;

        }

    }

    if(x%2)///再次判断 ，若不为0，则ans+1

        ans++;

    cout<<ans<<endl;

    return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

// Faster C++ solution for the same problem (measured speedup: 1.4008260302878308x):
#include <iostream>

#include <set>

using namespace std;

int main()

{

    int N, ans = 0;

    cin >> N;

    set<int> s;



    while (N--)

    {

        int t;

        cin >> t;

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

            s.erase(s.find(t));

        else

            s.insert(t);

    }

    cout << s.size();

    return 0;

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

#include<string.h>

#include<algorithm>

#include<iostream>

using namespace std;

int a[100000];

int main()

{

    int n;

    while(~scanf("%d",&n))

    {

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

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

        {

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

        }

        int c=0;

        sort(a,a+n);

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

        {

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

            {

                c+=2;

                i=i+2;

            }

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

            {

                i++;

            }

        }

        printf("%d\n",n-c);

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.394713749632777x):
#include <iostream>

#include <set>

using namespace std;

int main()

{

    int N, ans = 0;

    cin >> N;

    set<int> s;



    while (N--)

    {

        int t;

        cin >> t;

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

            s.erase(s.find(t));

        else

            s.insert(t);

    }

    cout << s.size();

    return 0;

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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

#include<cstdio>

using namespace std;

int main()

{

    long long int i,j,k,x,c=0,n;

    map<long long int,long long int>m;

   

    cin>>n;

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

    {

        cin>>x;

        

        m[x]++;

    }

    for(auto z:m)

    {

        if(z.second%2==1)

        {

            c++;

        }

    }

    cout<<c<<endl;

    return 0;



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

#include<string.h>

#include<algorithm>

#include<iostream>

using namespace std;

int a[100000];

int main()

{

    int n;

    while(~scanf("%d",&n))

    {

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

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

        {

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

        }

        int c=0;

        sort(a,a+n);

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

        {

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

            {

                c+=2;

                i=i+2;

            }

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

            {

                i++;

            }

        }

        printf("%d\n",n-c);

    }

    return 0;

}


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

#include<cstdio>

using namespace std;

int main()

{

    long long int i,j,k,x,c=0,n;

    map<long long int,long long int>m;

   

    cin>>n;

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

    {

        cin>>x;

        

        m[x]++;

    }

    for(auto z:m)

    {

        if(z.second%2==1)

        {

            c++;

        }

    }

    cout<<c<<endl;

    return 0;



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

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string.h>

using namespace std;

int main()

{

	int n,k=0;

	int ans=0,flag=0;

	int t=1;

	int a[100005],vis[100005];

	scanf("%d",&n);

	memset(vis,1,sizeof(vis));

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

	{

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

	}

	sort(a,a+n);

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

	{

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

		{

			vis[k]++;

		}

		else

		{

			k++;

		}

	}

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

	{

		if(vis[i]&1)

		{

			ans++;

		 } 

	}

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

	

	 return 0;

 } 

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

using namespace std;

int main()

{

    int n,i,sum = 0,m;

    map<int,int>mp;

    vector<int>v;

    cin>>n;

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

    {

        cin>>m;



        mp[m]++;



        v.push_back(m);

    }

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

    {



        if(mp[v[i]]%2!=0)

        {

            sum++;

            mp[v[i]] = 0;

        }

    }

    cout<<sum<<endl;

    return 0;

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

#include<string.h>

#include<algorithm>

#include<iostream>

using namespace std;

int a[100000];

int main()

{

    int n;

    while(~scanf("%d",&n))

    {

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

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

        {

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

        }

        int c=0;

        sort(a,a+n);

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

        {

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

            {

                c+=2;

                i=i+2;

            }

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

            {

                i++;

            }

        }

        printf("%d\n",n-c);

    }

    return 0;

}


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

using namespace std;

int main()

{

    int n,i,sum = 0,m;

    map<int,int>mp;

    vector<int>v;

    cin>>n;

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

    {

        cin>>m;



        mp[m]++;



        v.push_back(m);

    }

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

    {



        if(mp[v[i]]%2!=0)

        {

            sum++;

            mp[v[i]] = 0;

        }

    }

    cout<<sum<<endl;

    return 0;

}