#include using namespace std; int main() { string s = ""; for (int i = 0; i < 2; ++i) { string t; cin >> t; s += t; } string S = "o"; for (int i = 1; i <= 14; ++i) { if (s.find(S) == string::npos) { cout << i - 1 << endl; return 0; } else { S += "o"; } } cout << 14 << endl; }