#include using namespace std; typedef long long ll; typedef string str; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); str s1, s2; cin >> s1 >> s2; ll countt = 0, nmax = LONG_MIN; for (ll i = 0; i < s1.size(); i++) { if (s1[i] == 'o') countt++; else { nmax = max(nmax, countt); countt = 0; } } nmax = max(nmax, countt); countt = 0; for (ll i = 0; i < s2.size(); i++) { if (s2[i] == 'o') countt++; else { nmax = max(nmax, countt); countt = 0; } } nmax = max(nmax, countt); cout << nmax; return 0; }