stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include<iostream>

#include<map>

using namespace std;

map<int, bool> m;

int main()

{

	int n,temp,num=0;

	cin >> n;

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

	{

		cin >> temp;

		if (m[temp] == 1)

		{

			m[temp] = 0; num--;

		}

		else

		{

			m[temp] = 1; num++;

		}

	}

	cout << num;

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include<cstdio>

#include<string>

#include<vector>

#include<algorithm>

#include<set>

using namespace std;



int main()

{

	int n, number;

	cin >> n;

	set<int> s;

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

	{

		cin >> number;

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

		{

			s.insert(number);

		}

		else 

		{

			s.erase(number);

		}

	}

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

	

	

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

using namespace std;

int n,input,l;

set<int>total;

int main()

{

    total.clear();

    cin>>n;

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

            l=total.size();

        cin>>input;

        total.insert(input);

        int k=total.size();

        if(l==k){

            total.erase(input);

        }

    }

    cout<<total.size();

    return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

using namespace std;

const int N = 100001;

struct str{

    long long s,g;

}f[N];

long long n,z,c;

long long a[N];

void chong()

{

    f[1].s=a[1];f[1].g=1;c=1;

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

    {

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

        	f[++c].s=a[i],f[c].g=1;

        else f[c].g++;

    }

}

int main()

{

    cin>>n;

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

		cin>>a[i];

	}

    sort(a+1,a+n+1);

    chong();

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

    	if(f[i].g%2==1){

    		z++;

    	}

    }

    cout<<z<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

	cin>>n;

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

		cin>>a[i];

	sort(a,a+n);

	int cnt=0;

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

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

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

			cnt++;

		else

			i++;

	cout<<cnt<<endl;

	return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include<string.h>

#include<cstdio>

#include<map>

using namespace std;





int main(){



   int n, l, r;

   while(cin >> n){

      map<int, int> mp;

      //memset(flag, 0, sizeof(flag));

      int a;

      int cnt = 0;

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

         int a;cin >> a;

         mp[a]++;

         if(mp[a] & 1){

            cnt++;

         }else{

            cnt--;

         }

      }

      cout << cnt <<endl;

   }





   return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include <set>

using namespace std;



int main(){



    int n;

    set<int> a;

    int x;

    cin >> n;

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

        cin >> x;

        if(!a.insert(x).second)

            a.erase(x);

    }

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

    return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include<algorithm>

#include<map>

using namespace std;

int a[100010];

int main()

{

	int n,i,num=0,k=1;

	cin>>n;

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

	{

		cin>>a[i];

	}

	sort(a,a+n);

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

	{

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

			k=(k+1)%2;

		else

		{

			num+=k;

			k=1;

		}

	}

	if(k%2==1)

	  num+=1;

	cout<<num<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include<iostream>

#include<set>

using namespace std;

typedef long long ll;

set<ll>s;

int main()

{

    int n;

    cin>>n;

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

        ll t;

        cin>>t;

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

        else s.insert(t);

    }

    cout<<s.size();

    return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include<map>

using namespace std;

map<int,int>mp;

int main()

{

	int n,t,ans=0;

	cin >> n;

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

	{

		cin >> t;

		if(mp[t]==0)

		{

			mp[t]=1;

			ans++;

		}

		else

		{

			mp[t]=0;

			ans--;

		}

	}

	cout << ans;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

using namespace std;

int n;

map<int,int> mp;

int main(){

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

        mp.clear();

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

            int id;

            scanf("%d",&id);

            if(!mp.count(id)){

                mp[id] = 1;

            }

            else{

                mp[id] = mp[id] ^ 1;

            }

        }

        int ans = 0;

        for(auto it : mp){

            if(it.second == 1) ans++;

        }

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

    }

    return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include<math.h>

#include<string.h>

#include<iostream>

#include<algorithm>

#include<vector>

#include<utility>

#include<stack>

#include<queue>

#include<map>



#define se second



using namespace std;



map<int,int> mp;



int main()

{

    //    freopen("input.in", "r", stdin);

    

    int n; cin >> n;

    int hit = 0;

    while(n--)

    {

        int a;

        cin >> a;

        mp[a]++;

    }

    

    

    for(auto x : mp)

        if(x.se&1)

            hit++;

    

    cout << hit << "\n";

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#define fi first

#define se second

#define pb push_back

#define eb emplace_back

using namespace std;

typedef long long LL;

typedef pair<int,int> pii;

typedef vector<int> vi;



template<class T> inline T re(){

	T N = 0; char c = getchar(); bool neg = 0;

	for (; c < '0' || c > '9'; c = getchar()) neg |= c == '-';

	for (; c >= '0' && c <= '9'; c = getchar())

		N = (N<<3)+(N<<1) + c - '0';

	return neg ? -N : N;

}



int n;

set<int> s;



int main(){

	n = re<int>();

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

		int u = re<int>();

		if (s.find(u) != s.end()){

			s.erase(u);

		} else {

			s.insert(u);

		}

	}

	cout << s.size() << '\n';

	return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include <iostream>

#include <algorithm>

using namespace std;

int a[100005];

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;



}

                      


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include<iostream>

#include<algorithm>



using namespace std;



int main(){

	int n;

	cin>>n;

	int a[100001]={};

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

		cin>>a[i];

	}

	sort(a,a+n);

	int count=0,m=1;

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

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

			if(m%2==1) count++;

			m=1;

		}

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

			m++;

		}

	}

	if(m%2==1) count++;

	cout<<count;

	

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include <stdio.h>

#include <algorithm>

#include <string.h>

int a[100005];

using namespace std;

int main()

{

    int n;

    scanf("%d",&n);

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

    {

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

    }

    sort(a,a+n);

    int s=0;

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

    {

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

        {

            i=i+2;

        }

        else

        {

            s++;

            i++;

        }

    }

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

    return 0;

}




// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

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

#include<set>

#include<string.h>

#include<iostream>

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 <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
////////////////////////// Author

////////////////////////// Nasim Hossain Rabbi

////////////////////////// JU-CSE28

////////////////////////// CF - imnasim3.1415

////////////////////////// UVA - imnasim3.1415

////////////////////////// Mail - imnasim3.1415@gmail.com

#include<bits/stdc++.h>

using namespace std;

#define sz size()

#define mk make_pair

#define clr clear()

#define B begin()

#define E end()

#define EM empty()

#define mem(a,b) memset(a,b,sizeof(a))

#define rep(i,n) for(i=0;i<n;i++)

#define Rep(i,n) for(i=1;i<=n;i++)

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

#define pb push_back

#define endl '\n'

#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)

#define pi 3.1415926535897932384626433832795

#define vi vector<int>

#define vl vector<long long>

#define vs vector<string>

#define vp(vi,x) cin>>x; vi.pb(x);

typedef long long LL;

typedef unsigned long long ULL;

template<typename T>

 T gcd(T a,T b)

{

    return b==0?a:gcd(b,a%b);

}

template<typename T>

 T lcm(T a,T b)

{

    LL g=gcd(a,b);

    return (a/g)*b;

}

int main()

{

//    fast;

    int i,j,k,n,m,l,s=0,y,tc=1;

    while(cin>>n)

    {

        LL x,c=1,cc=0;

        vl a;

        rep(i,n)

        {

            vp(a,x);

        }

        sort(all(a));

        rep(i,n-1)

        {

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

            else

            {

                if(c%2==1 || c==0) cc++;

                c=1;

            }

        }

        if(c%2==1 || c==0) cc++;

        cout<<cc<<endl;

    }

}




// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

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

    {

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

    }

    sort(a, a + n);

    int c = 1, ans = 0;

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

    {

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

        {

            c++;

        }

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

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}

// Fastest known solution for this problem: