gets; p gets.chomp.gsub(/ /, '').scan(/11+/).map! { |al| al.length / 2}.inject(0, :+)