#include #include #include #include #define REP(i, a, b) for (int i = int(a); i < int(b); i++) using namespace std; typedef long long int lli; int main() { string s, t; cin >> s >> t; s = s + t + 'x'; int ans = 0; int cnt = 0; REP (i, 0, s.size()) { if (s[i] == 'o') cnt++; else { ans = max(ans, cnt); cnt = 0; } } cout << ans << endl; return 0; }