import java.util.Scanner object Problem203 { def main(args: Array[String]) { val sc = new Scanner(System.in) val w1 = sc.next() val w2 = sc.next() val gw = w1 + w2 val holidays = gw.split("x+") val holidaysLength = holidays.map(_.length) val longest = holidaysLength.reduceOption(_ max _).getOrElse(0) println(longest) } }