s = gets.chomp + gets.chomp if s["x"] == nil print 14 eisif s["o"] == nil print 0 else print s.split("x").max.length end