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