s = gets.chomp
tob=0
tow=0
s.size.times do |i|
  tob += 1 if i.even? and s[i] == "0"
  tob += 1 if i.odd? and s[i] == "1"
  tow += 1 if i.even? and s[i] == "1"
  tow += 1 if i.odd? and s[i] == "0"
end
p [tob, tow].min
