#include #include #include using namespace std; int main(){ cin.tie(nullptr); cout.tie(nullptr); ios_base::sync_with_stdio(false); int n,m; cin>>n; string a; cin>>a; int res1=1,res2=1,pos; for(int i=0;i>a; if(pos>0) { if(a[pos-1] == '#') { res1 = res1*2+1; pos--; } } if(pos>m; cin>>a; for(int i=0;i>a; if(pos>0) { if(a[pos-1] == '#') { res2 = res2*2+1; pos--; } } if(possteps; while(tmp!=1) { if(tmp%2==0) { even++; steps.push_back(1); bal++; } else { odd++; steps.push_back(-1); bal--; } if(abs(bal) > max) { max = bal; } tmp/=2; cnt++; } max++; cout<=0;i--) { cout<