#include using namespace std; int main(){ int ans = 0,d; cin >> d; string s = "xxxxxxx",tmp; cin >> tmp; s += tmp; cin >> tmp; s += tmp; s += "xxxxxxx"; for(int i = 0;i < s.size();i++){ int count = 0; tmp = s; for(int j = 0;j < d && tmp[i + j] == 'x';j++) tmp[i + j] = 'o'; for(int j = 0;j < tmp.size();j++){ if(tmp[j] == 'o'){ count++; ans = max(ans,count); }else count = 0; } } cout << ans << endl; }