package main import ( "bufio" "fmt" "os" ) func main() { sc := bufio.NewScanner(os.Stdin) sc.Scan() var b = make([]byte, 0, 100) b = append(b, sc.Bytes()...) sc.Scan() b = append(b, sc.Bytes()...) str := string(b) var max, yy int t := 1 for i := range str { if str[i] == 'o' { if yy == 1 { t++ } if max < t { max = t } yy = 1 } else { yy = 0 t = 1 } } fmt.Println(max) }