stablegradients/pie-gem5-pairs huggingface dataset:
// 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.3690971238713048x):
#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;

}
// 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.383157912045395x):
#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;

}
// 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.3879265239047343x):
#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;

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



}


// Faster C++ solution for the same problem (measured speedup: 5.290851144299642x):
#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<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;

}

// Faster C++ solution for the same problem (measured speedup: 5.282747569300441x):
#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 <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);

}
















// Faster C++ solution for the same problem (measured speedup: 5.146370215023896x):
#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 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;

}

// Faster C++ solution for the same problem (measured speedup: 5.294385583555769x):
#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;





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;

}


// Faster C++ solution for the same problem (measured speedup: 5.244287863937714x):
#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<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;

}


// Faster C++ solution for the same problem (measured speedup: 5.2433089891724265x):
#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 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);

}


// Faster C++ solution for the same problem (measured speedup: 5.221046502767031x):
#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:
//#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;



}


// Faster C++ solution for the same problem (measured speedup: 4.849565011270748x):
#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<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;

}


// Faster C++ solution for the same problem (measured speedup: 5.267804428724588x):
#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 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;

}


// Faster C++ solution for the same problem (measured speedup: 5.180814900213756x):
#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<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;

}

// Faster C++ solution for the same problem (measured speedup: 5.286909827341055x):
#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<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;

}

// Faster C++ solution for the same problem (measured speedup: 4.845435201186106x):
#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 <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;

}

// Faster C++ solution for the same problem (measured speedup: 5.164204257775833x):
#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 <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;

}


// Faster C++ solution for the same problem (measured speedup: 5.16375295025314x):
#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 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;

} 

// Faster C++ solution for the same problem (measured speedup: 5.348743705746203x):
#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 <cstdio>

#include <set>

using namespace std;

int main(){

    set<int> st;

    int n,x;

    scanf("%d",&n);

    while(n--){

        scanf("%d",&x);

        if(st.count(x)==0)

            st.insert(x);

        else st.erase(x);

    }

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

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.848057937159828x):
#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 <cstdio>

#include <cstring>

#include <algorithm>

#include <set>

using namespace std;

int main(){

    set<int> st;

    int n,x;

    scanf("%d",&n);

    while(n--){

        scanf("%d",&x);

        if(st.count(x)==0)

            st.insert(x);

        else st.erase(x);

    }

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

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.848057937159828x):
#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 <set>

using namespace std;



int main()

{

    set<int> s;

    int n,i,sum=0;

    cin>>n;

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

    {

        int x;

        cin>>x;

        if(s.count(x)==0)

            s.insert(x);

        else s.erase(x);

    }

    sum=s.size();

    cout<<sum<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.287386966807918x):
#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 "map"

using namespace std;



int main()

{

	int n;

	map<int,int> m;

	int count=0;

	cin>>n;

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

	{

		int num;

		cin>>num;

		if(m[num]==0)

		{

			m[num]=1;

			count++;

		}

			

		else

		{

			m[num]=0;

			count--;

		}

	}

	cout<<count<<endl;

	system("pause");

}

// Faster C++ solution for the same problem (measured speedup: 5.305577670187597x):
#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<string.h>

#include<algorithm>

using namespace std;

#include<set>

#pragma warning(disable:4996)

set<int> s;

void zaichangnei() {

	int N = 0;

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

		s.clear();

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

			int tmp = 0;

			scanf("%d", &tmp);

			if (s.find(tmp) == s.end())s.insert(tmp);

			else s.erase(tmp);

		}

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

	}

}

int main() {

	//baixianguo();

	//diancai();

	zaichangnei();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.222983336710402x):
#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;

}