#include #define MOD 1000000007 #define INF (1<<30) #define INFL (1<<62) #define pe(str) return cout<<(str)<=0;i--) #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b);i>=(a);i--) #define bw(a,b,c) (((a)<=(b))&&((b)<=(c))) #define hello cout<<"hello"<>n #define EPS 1e-6 #define EPSIN(a,b) ((b)-EPS<=(a)&&(a)<=(b)+EPS) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair pii; typedef complex point; template void dump(InputIterator first,InputIterator last,char delim=' '){ for(InputIterator it=first;it!=last;it++){ if(it!=first)cout< void swp(T &a,T &b){ T t=a; a=b; b=t; } int main(void){ int n; int k[14]={0}; string a,b; int s[14],t[14]; cin>>n>>a>>b; a+=b; re(i,14)s[i]=t[i]=IF(a[i]=='o',1,0); re(i,n)k[i]=1; sort(k,k+14); int m=0; do{ int c=0; int mt=0; int nocori=0; copy(t,t+14,s); re(i,14){ if(s[i]&&k[i])nocori++; s[i]|=k[i]; } re(i,14){ c=IF(s[i],c+1,0); mt=max(mt,c); } m=max(mt+nocori,m); }while(next_permutation(k,k+14)); pe(m); return 0; }