class Calc0203 def initialize(args) args = args.map { |l| l.chomp.split(/\s+/) } @s = args.map(&:first).join end def run @s.scan(/o+/).map(&:size).max || 0 end end puts Calc0203.new(STDIN.readlines).run if __FILE__ == $0