s = gets.chomp + gets.chomp if s.include?("x").! print 14 elsif s.include?("o").! print 0 else print s.split("x").max.length end