DSA Learning Series [Contest 2] Problem --- PSHOT

Can anyone help me in finding a case where i am going wrong ??
Here is the question link https://www.codechef.com/LRNDSA02/problems/PSHOT
Here is my code …

#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
ll t;
cin>>t;
while(t–)
{
ll n,i,size;
cin>>n;
n=n*2;
string st;
cin>>st;
stack s;
for(i=0;i<n;i++)
{
if(i%2==0 && st[i]==‘1’)
{
s.push(int(st[i]));
}
else if(i%2!=0 && st[i]==‘1’)
{
if(!s.empty())
s.pop();
}
}
size=s.size();
cout<<n-size<<endl;
}
return 0;
}