n = 0
s = gets
a = s.split("")
len = a.length
len.times do |i|
    j = a[i+1]
    if a[i] == j then
        if j==1
            j = 0
        else
            j = 1
        end
        n = n+1
    end
end
puts n