str = gets.strip.split("")
if str[0] == "0"
	ptn0 = "0"
	ptn1 = "1"
else
	ptn0 = "1"
	ptn1 = "0"
end
sample = []
cnt = 0
str.length.times do | i |
	if i % 2 == 0
		sample << ptn0
	else
		sample << ptn1
	end
	if str[i] != sample[i]
		cnt += 1
	end
end
puts cnt