s = gets.chomp! s += gets max = 0 count = 0 s.each_char do |c| if c == "o" count += 1 else if count > max max = count end count = 0 end end if count > max max = count end puts max