s = gets.chomp res = 0 cur = 0 for i in 0...s.length c = s[i] if c.ord == 33123 cur += 1 res=cur if cur>res else cur = 0 end end puts res