S = gets.chomp.chars.map(&:to_i)

count = 0
pre = nil
S.each do |s|
  if pre == nil
    pre = s
    next
  else
    if pre == s
      count += 1
      pre = s == 0 ? 1 : 0
    else
      pre = s
    end
  end
end

puts count