#include #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define rer(i, a, b) for (int i = (int)a; i <= (int)b; ++i) #define each(i,c) for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define all(v) v.begin(), v.end() #define mset(a, n) memset(a, n, sizeof(a)) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector vi; typedef vector vs; typedef vector > vvi; typedef vector > vpii; typedef pair pii; typedef pair pll; const int inf = 1000000000; const int mod = 1000000007; const double eps = 1e-9; const int dx[] = { -1, 0, 1, 0}; const int dy[] = { 0, -1, 0, 1}; int main() { // cin.tie(0); // tie // ios::sync_with_stdio(false); // sync string s1, s2; cin >> s1 >> s2; s1 += s2; int ans = 0, cnt = 0; rep(i, s1.size()) { if (s1[i] == 'o') cnt++; else cnt = 0; ans = max(ans, cnt); } cout << ans << endl; return 0; }