#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const double PI = 3.14159265358979323846; const double EPS = 1e-12; const int INF = 1<<25; typedef pair P; typedef long long ll; typedef unsigned long long ull; int main(){ int D; string u, s, t; int res = 0, cnt = 0; cin>>D>>s>>t; u = s+t; for(int j = 0; j < u.size(); j++){ s = u; for(int k = j; k < min((int)u.size(), j+D); k++){ if(s[k]=='o') break; s[k] = 'o'; } cnt = 0; for(int i = 0; i < s.size(); i++){ if(s[i]=='o') cnt++; else cnt = 0; res = max(res, cnt); } } cout<