stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#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);

}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
    #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;

    }

     

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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; 

}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


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



}


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

#include <string.h>

#include <string>

#include <algorithm>

#include <map>

using namespace std;

#include <map>

#include <iostream>

int main()

{

	map<string, int> mp;

	int n;

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

	{

		string str;

		int num = 0;

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

		{

			cin >> str;

			mp[str]++;

		}

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

		{

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

				num++;

		}

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

	}

	return 0;

}

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



}


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

#include <algorithm>

#include <string>

using namespace std;







int main()

{

//	freopen("D:\\patin.txt","r",stdin);

	int N;

	int* num = new int[1000000];

	int* data = new int[1000000];

	int sum = 0;



	scanf("%d",&N);

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

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



	}

	sort(num,num+N);

	int len = 0;

	int pre = num[0];

	while(len < N){

		int tmp = 0;

		while(num[len] == pre && len < N){

			++tmp;

			++len;

		}

		if(tmp%2)

			++sum;

		pre = num[len];	

	}

	cout << sum << endl;

	return 0;	

} 

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <algorithm>

using namespace std;

int a[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;



}


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

#include <cstring>

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

}

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



}


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

#include<cstdio>

#include<math.h>

#include<string>

#include<vector>

#include<algorithm>

#include<map>

using namespace std;

int main()

{

	long long temp;

	int n;

	scanf("%d", &n);

	map<long long, int>p;

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

	{

		scanf("%lld", &temp);

		p[temp] += 1;

	}

	int count = 0;

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

	{

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

			count++;

	}

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

	system("pause");

	return 0;

}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


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



}


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

#include<cstring>

#include<cstdio>

#include<cmath>

#include<algorithm>

#include<string>

#include<map>



typedef long long ll;



using namespace std;

map<ll,bool> m;

int main()

{

	int n;

	cin >> n;

	int num = 0;

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

		ll k;

		cin >> k;

		if(m[k] == true){

			m[k] = false;

			num--;

		}else{

			m[k] = true;

			num++;

		}

	}

	cout << num <<endl;

	return 0;

}

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



}


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

#include<cstdio>

#include<map>



using namespace std;

typedef long long ll;



map< ll, int> num;



int main()

{

    int n;

    int a;

    int sum = 0;



    cin >> n;

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

    {

        scanf("%d", &a);

        if(num[a])

        {

            num[a]--;

            sum--;

        }

        else

        {

            num[a]++;

            sum++;

        }

    }

    cout << sum << endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <algorithm>

using namespace std;

int a[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;



}


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

#include<set>

using namespace std;

set <int> s;

int main()

{

    int n;

    cin>>n;

    while(n--)

    {

        int x;

        cin>>x;

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

            s.erase(x);

        else

            s.insert(x);

    }

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

    return 0;

 } 


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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;



}

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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


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



}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}






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



}


// Fastest known solution for this problem: