#include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <set>
#include <queue>
using namespace std;
#define eps 1e-7
#define PI acos(-1)
//#define de(x) cout<<#x<<'='<<x<<" , "
//#define dee(x) cout<<#x<<'='<<x<<endl
#define sz(x) x.size()
#define mp make_pair
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define mset(a,b) memset(a,b,sizeof(a))
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define pb push_back
#define ElemtType int
#define random ((rand()&1)?1:-1)*(rand()%13*rand()^233)

typedef unsigned int ui;
typedef pair<int,int> pii;
typedef pair<ui,int> puii;
typedef vector<int> vi;
const int maxn=205500;
int cnt=1,root=0;
bool fl;

struct Treap{
    int key,pri,sz,son[2];
    void setval(int x,int z=1){
        static int seed=3312;
        key=x;
        pri=seed=int(seed*48271LL%2147483647);
        //pri=rand();
        sz=z;
        son[0]=son[1]=0;
    }
}T[maxn];
void rotate(int &x,int p){
    /// p==0 zuo
    int y=T[x].son[!p];
    T[x].son[!p]=T[y].son[p];
    T[y].son[p]=x;
    T[y].sz=T[x].sz;
    T[x].sz=T[T[x].son[0]].sz+1+T[T[x].son[1]].sz;
    x=y;
}
void ins(int &x,int val){
    if(x==0){
        T[x=cnt++].setval(val);
    }
    else{
        int p=val>T[x].key;
        ins(T[x].son[p],val);
        T[x].sz++;///!!!!!!!!!!!!!daxiaogendui
        if(T[x].pri>T[T[x].son[p]].pri)
            rotate(x,!p);
    }
}

void del(int &x,int val){
    if(T[x].key==val){
        if(T[x].son[0]&&T[x].son[1]){
            int p=T[T[x].son[0]].pri<T[T[x].son[1]].pri;
            rotate(x,p);
            del(T[x].son[p],val);
            --T[x].sz;
        }
        else{
            if(!T[x].son[0])
                x=T[x].son[1];
            else
                x=T[x].son[0];
        }
    }
    else {
        int p=T[x].key<val;
        del(T[x].son[p],val);
        T[x].sz--;

    }
}

int find(int &x,int k){
   // de(x),dee(k);
    //de(T[x].son[0]),dee(T[x].son[1]);
    if(k<=0||x==0||k>T[x].sz) return -1;
    if(k==T[T[x].son[0]].sz+1)
        return x;
    if(k>T[T[x].son[0]].sz+1)
        return find(T[x].son[1],k-T[T[x].son[0]].sz-1);
    return find(T[x].son[0],k);
}


int fa[maxn],sz[maxn];
int findfa(int x){
    if(fa[x]==x) return x;
    return fa[x]=findfa(fa[x]);
}
void Union(int x,int y){
    int fx=findfa(x),fy=findfa(y);
    if(fx==fy) return ;
    if(sz[fx]!=1) del(root,sz[fx]);
    if(sz[fy]!=1) del(root,sz[fy]);
    ins(root,sz[fx]+sz[fy]);
    fa[fx]=fy; sz[fy]+=sz[fx];
}
int main(){
    //freopen("in.in","r",stdin);
    /*
    int n,m;
    scanf("%d %d",&n,&m);
    for(int i=0;i<maxn;++i)
        fa[i]=i,sz[i]=1;
    while(m--){
        int op,x,y;
        scanf("%d",&op);
        if(!op){
            scanf("%d %d",&x,&y);
            Union(x,y);
        }
        else{
            scanf("%d",&x);
            x=T[root].sz-x+1;
            y=find(root,x);
            int ans;
            if(y==-1) ans=1;
            else ans=T[y].key;
            printf("%d\n",ans);
        }
    }
    */
    set<int> rec;
    srand(time(NULL));
    int n; cin>>n;
    while(n--){
        int x; scanf("%d",&x);
        if(!rec.count(x)){
            rec.insert(x);
            ins(root,x);
        }
        else {
            del(root,x);
            rec.erase(x);
        }
    }
    printf("%d\n",T[root].sz);

}



Measured memory_bytes: 7424