#include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(x, to) for (int x = 0; x < (to); x++) #define REP(x, a, to) for (int x = (a); x < (to); x++) #define foreach(itr, x) for (typeof((x).begin()) itr = (x).begin(); itr != (x).end(); itr++) using namespace std; typedef long long ll; typedef pair PII; typedef pair PLL; string s, t; int tmp, ans; int main() { cin >> s; cin >> t; s += t; s += 'x'; rep(i, s.size() - 1) { if (s[i] == 'o' && s[i+1] == 'o') { tmp++; } else if (s[i] == 'o' && s[i+1] == 'x') { tmp++; ans = max(ans, tmp); tmp = 0; } } cout << ans << endl; return 0; }