puts read_line.split(/0{2,}/, remove_empty: true).sum { |s| {s.count('0') + 2, s.count('1')}.min }