Hello i have done solution of question code PSHOT

i am getting notification while submitting that is wrong answer plz tell me where i am wrong

/******************************************************************************

                          Online C++ Compiler.
           Code, Compile, Run and Debug C++ program online.

Write your code in this editor and press “Run” button to compile and execute it.

*******************************************************************************/

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

int main()
{
int i,n,t;
string str;
cin>>t;
while(t–)
{
int a=0,b=0,s=0;
cin>>n;
int c=0;
cin>>str;
i=0;
while(i<str.length())
{
if(str[i]==‘1’)
{
a++;
}
i++;
if(str[i]==‘1’)
{
b++;
}
i++;
s++;
if(((a-b)>(n-s))||((b-a)>(n-s)))
{
c++;
break;
}
}
if(c>0)
cout<<i<<endl;
else
cout<<2*n<<endl;

}
return 0;

}