#include using namespace std; int main(){ string s,t; int n; cin >> n >> s >> t; s += t; int ans = 0; for(int i = 0; i < 14-n+1; i++){ t = s; for(int j = i; j < i+n; j++){ t[j] = 'o'; } int pos = 0; while(pos != 14){ while(pos != 14 && t[pos] == 'x') pos++; int now = 0; while(pos != 14 && t[pos] == 'o'){ pos++; now++; } ans = max(ans, now); } } cout << ans << endl; return 0; }