// yukicoder: No.203 ゴールデン・ウィーク(1) // 2019.4.13 bal4u #include #include //// 高速入力 #if 0 #define gc() getchar_unlocked() #else #define gc() getchar() #endif int ins(char *s) // 文字列の入力 スペース以下の文字で入力終了 { char *p = s; do *s = gc(); while (*s++ > ' '); *--s = 0; return s - p; } char c[20], *p; int main() { int w, f, ans; ins(c), ins(c + 7); ans = 0, p = c, f = 0, w = 0; while (*p) { if (*p == 'o') { if (!f) f = 1, w = 1; else w++; } else { if (f && w > ans) ans = w; f = 0; } p++; } if (f && w > ans) ans = w; printf("%d\n", ans); return 0; }