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

#include <algorithm>

using namespace std;



const int M = 1e5+10;

int a[M];



int main()

{

	int m;

	cin>>m;

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

		cin>>a[i];

	sort(a,a+m);

	int cnt=0;

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

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

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

			cnt++;

		else

			i++;

	cout<<cnt<<endl;

	return 0;

}


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

#include<algorithm>

#include<string.h>

using namespace std;

int a[100005];

int main()

{

    int n,sum=0,i,j;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

        if(a[i]==a[n-1]&&(n-i)%2==1)

        {

            sum++;

            break;

        }

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

        {

            if(a[i]!=a[j]&&(j-i)%2==1)

            {

                sum++;

                break;

            }

            else if(a[i]!=a[j]&&(j-i)%2==0)

                break;

        }

    }

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

    return 0;

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

#include<set>

using namespace std;

set<int> st;

set<int>::iterator it;

int main(){

	int n;

	cin>>n;

	while(n--){

		int a;

		cin>>a;

		it=st.find(a);

		if(it!=st.end()){

			st.erase(a);

		}else{

			st.insert(a);

		} 

	}

	int ans=0;

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

		ans++;

	} 

	cout<<ans<<endl;

}


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

#include<algorithm>

#include<string.h>

using namespace std;

int a[100005];

int main()

{

    int n,sum=0,i,j;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

        if(a[i]==a[n-1]&&(n-i)%2==1)

        {

            sum++;

            break;

        }

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

        {

            if(a[i]!=a[j]&&(j-i)%2==1)

            {

                sum++;

                break;

            }

            else if(a[i]!=a[j]&&(j-i)%2==0)

                break;

        }

    }

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

    return 0;

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

#include<iostream>

#include<queue>

#include<map>

#include<set>

#include<vector>

#include<utility>

#include<stack>

#include<algorithm>

#include<string>

#include<string.h>

#define fi first

#define se second

#define pb push_back

using namespace std;

typedef long long ll;

typedef pair<ll,ll> ii;



const int N = 1e6;



set<int> ls;



int main(){

    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

    int n; cin >> n;

    while(n--){

        int x; cin >> x;

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

        else ls.insert(x);

    }



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



}

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

#include<algorithm>

#include<string.h>

using namespace std;

int a[100005];

int main()

{

    int n,sum=0,i,j;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

        if(a[i]==a[n-1]&&(n-i)%2==1)

        {

            sum++;

            break;

        }

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

        {

            if(a[i]!=a[j]&&(j-i)%2==1)

            {

                sum++;

                break;

            }

            else if(a[i]!=a[j]&&(j-i)%2==0)

                break;

        }

    }

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

    return 0;

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

#include<stdio.h>

#include<string.h>

#include<set>

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;

}


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

#include<algorithm>

#include<string.h>

using namespace std;

int a[100005];

int main()

{

    int n,sum=0,i,j;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

        if(a[i]==a[n-1]&&(n-i)%2==1)

        {

            sum++;

            break;

        }

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

        {

            if(a[i]!=a[j]&&(j-i)%2==1)

            {

                sum++;

                break;

            }

            else if(a[i]!=a[j]&&(j-i)%2==0)

                break;

        }

    }

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

    return 0;

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

#include <string.h>

#include <stdio.h>

#include <algorithm>

#define ll longlong

using namespace std;

int a[100005];

int main()

{

    int t,s=0;

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

{

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

       {

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

       }

       sort(a,a+t);

    for(int k=0;k<t; )

      {

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

          k=k+2;

        else

         {

          s++;

          k++;

         }

      }

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

}

    return 0;

}






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

#include<algorithm>

#include<string.h>

using namespace std;

int a[100005];

int main()

{

    int n,sum=0,i,j;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

        if(a[i]==a[n-1]&&(n-i)%2==1)

        {

            sum++;

            break;

        }

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

        {

            if(a[i]!=a[j]&&(j-i)%2==1)

            {

                sum++;

                break;

            }

            else if(a[i]!=a[j]&&(j-i)%2==0)

                break;

        }

    }

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

    return 0;

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

#include<stdio.h>

#include<string.h>

#include<set>

using namespace std;

int main()

{

    int n;

    scanf("%d",&n);

    set<int>st;

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

    {

        int x;

        cin>>x;

        if(st.count(x))

        {

            st.erase(x);

        }

        else st.insert(x);

    }

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

    return 0;

}


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

#include<algorithm>

#include<string.h>

using namespace std;

int a[100005];

int main()

{

    int n,sum=0,i,j;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

        if(a[i]==a[n-1]&&(n-i)%2==1)

        {

            sum++;

            break;

        }

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

        {

            if(a[i]!=a[j]&&(j-i)%2==1)

            {

                sum++;

                break;

            }

            else if(a[i]!=a[j]&&(j-i)%2==0)

                break;

        }

    }

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

    return 0;

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

#include <stdio.h>

#include <string.h>

#include <algorithm>

using namespace std;

int a[100005];

int main()

{

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

    scanf("%d",&n);

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

    {

        scanf("%d",&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++;

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

    return 0;

}

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

#include<algorithm>

#include<string.h>

using namespace std;

int a[100005];

int main()

{

    int n,sum=0,i,j;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

        if(a[i]==a[n-1]&&(n-i)%2==1)

        {

            sum++;

            break;

        }

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

        {

            if(a[i]!=a[j]&&(j-i)%2==1)

            {

                sum++;

                break;

            }

            else if(a[i]!=a[j]&&(j-i)%2==0)

                break;

        }

    }

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

    return 0;

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

#include<algorithm>

#include<stack>

using namespace std;

#define ll long long

ll a[100005];

int main()

{

    stack<int>s;

    int n;

    cin>>n;

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

    {

        cin>>a[i];

    }

    sort(a,a+n);

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

    {

        if(!s.empty())

        {

            if(a[i]==s.top())

            {

                s.pop();

            }

            else

                s.push(a[i]);

        }

        else

        {

           s.push(a[i]);

        }

    }

    int num=s.size();

    cout<<num<<endl;

    return 0;

}


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

#include<algorithm>

#include<string.h>

using namespace std;

int a[100005];

int main()

{

    int n,sum=0,i,j;

    scanf("%d",&n);

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

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

    sort(a,a+n);

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

    {

        if(a[i]==a[n-1]&&(n-i)%2==1)

        {

            sum++;

            break;

        }

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

        {

            if(a[i]!=a[j]&&(j-i)%2==1)

            {

                sum++;

                break;

            }

            else if(a[i]!=a[j]&&(j-i)%2==0)

                break;

        }

    }

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

    return 0;

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

#include <iomanip>

#include <algorithm>

#include <vector>





#define MOD 1000000007

#define INTMAX 0x7fffffff

#define INTMIN 0x80000000

#define LLMAX 0x7fffffffffffffffLL

#define LLMIN 0x8000000000000000LL



#define REP(i,a,b) for(int i=a;i<b;i++)

#define rep(i,n) REP(i,0,n)



using namespace std;

using ll = long long;



int main(){

    vector<int> v;



    int N;

    cin >> N;



    int A;

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

        cin >> A;

        auto it = lower_bound(v.begin(), v.end(), A);

        if (it != v.end() && *it == A) {

            //cout << "erase " << A << endl;

            v.erase(it);

        } else {

            //cout << "insert " << A << endl;

            v.insert(it, A);

        }

        //for (int vi : v) {

        //    cout << vi << ", ";

        //}

        //cout << endl;

    }



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

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

using namespace std;

#define ll long long

map<int,bool> mp;

int num,n,x;

int main(){

	scanf("%d",&n);

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

		scanf("%d",&x);

		if(mp[x]){

			num--;

			mp[x] = false;

		}

		else{

			num++;

			mp[x] = true;

		}		

	}

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

	return 0;

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

using namespace std;

#define ll long long

inline ll read(){ll x=0,f=1;char ch=getchar();for(;ch<'0'||ch>'9';ch=getchar())if(ch=='-')f=-1;for(;ch>='0'&&ch<='9';ch=getchar())x=x*10+ch-48;return x*f;}

inline void write(ll x){if(x>9)write(x/10);putchar('0'+x%10);}

inline void writeln(ll x){write(x);puts("");}

map<int,int>a;

int n,x,ans;

int main()

{

	n=read();

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

		x=read();

		if(a[x]){

			ans--;

			a[x]=0;

		}

		else{

			ans++;

			a[x]=1;

		}

	}

	writeln(ans);

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

#include<cstdio>

#include<cstring>

#include<algorithm>

#define ll long long

#define N 100005

#define inf (1ll<<60)

#define rep(i,j,k) for (ll i=j;i<=k;++i)

#define per(i,j,k) for (ll i=j;i>=k;--i)

using namespace std;

inline ll read(){

	char ch=getchar(); ll x=0,f=1;

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

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

	return x*f;

}

ll n,ans;

map<ll,bool> mp;

int main(){

	n=read();

	rep(i,1,n){

		ll x=read();

		if (mp[x]){

			--ans; mp[x]=0;

		}else{

			++ans; mp[x]=1;

		}

	}

	printf("%lld",ans);

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

#include <cstdlib>

#include <cstring>

#include <cctype>

#include <algorithm>

#include <iostream>

#include <vector>

#include <map>

using namespace std;



typedef long long ll;

typedef double db;

typedef pair<int, int> pii;

typedef vector<int> vi;



namespace IO {

  static const int SZ = 1 << 20;

  static FILE *fin = stdin, *fout = stdout;

  static char ibuf[SZ], *is = ibuf, *it = ibuf;

  static char obuf[SZ], *os = obuf, *ot = obuf + SZ;



  inline char nextChar() {

    if (is == it) {

      it = (is = ibuf) + fread(ibuf, sizeof(char), SZ, fin);

      if (is == it)

        return EOF;

    }

    return *is++;

  }

  template <typename T>

  inline void readInt(T &x) {

    x = 0;

    T flag(1);

    char ch;

    for (ch = nextChar(); isspace(ch); ch = nextChar())

      ;

    if (ch == '-')

      ch = nextChar(), flag = -flag;

    for (; isdigit(ch); ch = nextChar())

      x = x * 10 + ch - '0';

    x *= flag;

  }

  inline void readCh(char &now) {

    for (now = nextChar(); isspace(now); now = nextChar())

      ;

  }



  inline void flushBuffer() {

    fwrite(obuf, sizeof(char), os - obuf, fout);

    os = obuf;

  }

  inline void printChar(char ch) {

    if (os == ot)

      flushBuffer();

    *os++ = ch;

  }

  template <typename T>

  inline void printInt(T x) {

    static int dig[20], cnt;

    if (os + 20 > ot)

      flushBuffer();

    if (x < 0)

      *os++ = '-', x = -x;

    cnt = 0;

    do {

      dig[++cnt] = x % 10;

      x /= 10;

    } while (x);

    for (int i = cnt; i > 0; --i)

      *os++ = dig[i] + '0';

  }

}



using namespace IO;



const int N = 1e5 + 5;



int n, a[N];

map<int, bool> mp;



int main() {

#ifdef LOCAL_DEBUG

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

  freopen("test.out", "w", stdout);

#endif

  readInt(n);

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

    int p;

    readInt(p);

    if (mp[p])

      mp[p] = false;

    else mp[p] = true;

  }

  int ans = 0;

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

    if (it->second)

      ++ans;

  }

  printInt(ans);

  printChar('\n');

  flushBuffer();

  return 0;

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

#include<algorithm>

#include<cmath>

#include<cstring>

#include<map>

using namespace std;

map<int,int>mp;

int n,ans;

int main(){

	cin>>n;

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

		int x;

		cin>>x;

		if(mp[x]==1){

			ans--;

			mp[x]=0;

		}else{

			ans++;

			mp[x]=1;

		}

	}

	cout<<ans<<endl;

	return 0;

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

#include <algorithm>

#include <cmath>

#include <cstring>

#include <iostream>

#include <ctime>

#include <map>

#include <queue>

#include <cstdlib>

#include <string>

#include <climits>

#include <set>

#include <vector>

using namespace std;

inline int read(){

	int k=0,f=1;char ch=getchar();

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

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

	return k*f;

}

inline void write(int x){

	if(x<0)putchar('-'),x=-x;

	if(x>9)write(x/10);putchar(x%10+'0');

}

inline void writeln(int x){

	write(x);puts("");

}

set<int>s;

int main()

{

	int n=read();

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

		int x=read();

		if(!s.count(x))s.insert(x);

		else s.erase(s.find(x));

	}

	writeln(s.size());

	return 0;

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

using namespace std;

set<int> s;

int n,x;

int main()

{

	cin>>n;

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

	{

		cin>>x;

		if(s.count(x))

			s.erase(x);

		else

			s.insert(x);

	}

	cout<<s.size();

	return 0;

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

    using namespace std;

    #define LL long long

    #define Max(a,b) ((a)>(b)?(a):(b)) 

    #define Min(a,b) ((a)<(b)?(a):(b)) 

     

    //FILE *fp,*fp2;

    //fp=fopen("input.txt","r");

    //fp2=fopen("output.txt","w");

     

    int main()

    {

        int n;

        set<LL int> num;

        set<LL int>::iterator it;

        cin>>n;

        LL int x;

        while(n--)

        {

            cin>>x;

            it=num.find(x);

            if (it ==num.end())

            {

                num.insert(x);

            }

            else

            {

                num.erase(it);

            }

        }

        x=num.size();

        cout<<x<<endl;

        

        return 0;

    }

     

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

using namespace std;

const int maxn=100000+10; 

map<int,int>m;

int main()

{

	int n,a;

	cin>>n;

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

	{

		cin>>a;

		m[a]++;

	}

	int ans=0;

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

	{

		int temp=(*it).second;

		if(temp%2==1)

			ans++;

	}

	cout<<ans<<endl;

	return 0; 

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

#include<algorithm>

#include<string.h>

#include<set>

using namespace std;

typedef long long ll;

set<ll> st;set<ll>::iterator it;

int main() {

	ll n;

	scanf("%lld", &n);

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

		ll t;scanf("%lld", &t);

		it = st.find(t);

		if ( it== st.end()) {

			st.insert(t);

		}

		else st.erase(it);

	}

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

	getchar();getchar();

	return 0;

}

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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



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

#include <stack>

#include<cstdio>

#include<algorithm>

#include<string.h>

#include<set>

#include<map>

#include<cmath>

#define MAXN 100001

#include<utility>

#define DEBUG 0



using namespace std;

typedef long long ll;

int main()

{

    #if DEBUG

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

    #endif // DEBUG

    map<int,int> v;

    int n;

    scanf("%d",&n); 

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

    {

        int d;

        scanf("%d",&d);

        if(v.count(d)) v.erase(d);

        else v[d];

    }



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

    cout<<endl;

    #if DEBUG

    fclose(stdin);

    #endif // DEBUG



    return 0;

}


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

#include <string.h>

#include <algorithm>

using namespace std;

int a[100050];

int main()

{

    int n,k=0;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

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

    {

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

            i=i+2;

        else

        {

            k++;

            i++;

        }

    }

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

    return 0;



}