a = list(str(eval(input())))



empty = []



empty.append([i for i in a[0::2]])

empty.append([i for i in a[1::2]])



aa = empty[0].count('0') + empty[1].count('1')

bb = empty[0].count('1') + empty[1].count('0')



if aa >= bb:

    print(bb)

else:

    print(aa)
s = eval(input())



candi = []



candi.append(s[0::2].count('0') + s[1::2].count('1'))

candi.append(s[0::2].count('1') + s[1::2].count('0'))



print((min(candi)))
a = list(str(eval(input())))
empty = []
empty.append([i for i in a[0::2]])
empty.append([i for i in a[1::2]])
aa = empty[0].count("0") + empty[1].count("1")
bb = empty[0].count("1") + empty[1].count("0")
if aa >= bb:
    print(bb)
else:
    print(aa)

s = eval(input())
candi = []
candi.append(s[0::2].count("0") + s[1::2].count("1"))
candi.append(s[0::2].count("1") + s[1::2].count("0"))
print((min(candi)))

-a = list(str(eval(input()))) -empty = [] -empty.append([i for i in a[0::2]]) -empty.append([i for i in a[1::2]]) -aa = empty[0].count("0") + empty[1].count("1") -bb = empty[0].count("1") + empty[1].count("0") -if aa >= bb: -    print(bb) -else: -    print(aa) +s = eval(input()) +candi = [] +candi.append(s[0::2].count("0") + s[1::2].count("1")) +candi.append(s[0::2].count("1") + s[1::2].count("0")) +print((min(candi)))