#include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(i,s,e) for (int i = int(s); i != int(e); i++) #define FORIT(i,c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); i++) #define ISEQ(c) (c).begin(), (c).end() int main(){ string s1; string s2; cin >> s1 >> s2; s1 += s2; int max = 0; int now = 0; FOR(i,0,14){ if(s1[i] == 'o'){ now++; }else{ if (max < now) max = now; now = 0; } } if (max < now) max = now; cout << max << endl; return 0; }