#include #include #include using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { string S1, S2, C; cin >> S1 >> S2; C = S1 + S2; int ans = 0, cnt = 0, n = C.length(); rep(i, n) { cnt = max(cnt, (int)(C[i] == 'o')); cnt = i != n && C[i] == 'o' && C[i] == C[i + 1] ? cnt + 1 : 0; ans = max(ans, cnt); } cout << ans << endl; }