$s = gets.chomp.split("").map!{|i| i.to_i}
$int = 0

def aa(x)
  $int += 2
  $s.slice!(x,2)
  puts $s.join
  if $s[x-1] == 1 and $s[x] == 0 or $s[x-1] == 0 and $s[x] == 1
    aa(x-1)
    end
  if $s[x] == 1 and $s[x+1] == 0 or $s[x] == 0 and $s[x+1] == 1
    aa(x)
  end
end
2.times do 
  $s.length.times do |i|
    if $s[i] == 1 and $s[i+1] == 0 or $s[i] == 0 and $s[i+1] == 1
      aa(i)
    end
  end
end
puts $int
  