m = 0 t = 0 gets.chomp.each_char do |c| if c == '…' t += 1 else m = [t, m].max t = 0 end end puts m