tiles = list(map(int, eval(input())))



even = tiles[0::2]

odd = tiles[1::2]



if even.count(0) >= even.count(1):

    ans1 = even.count(1) + odd.count(0) 



else:

    ans1 = even.count(0) + odd.count(1)

    

if odd.count(0) >= odd.count(1):

    ans2 = odd.count(1) + even.count(0) 



else:

    ans2 = odd.count(0) + even.count(1)



print((min(ans1, ans2)))
tiles = list(map(int, eval(input())))



even = tiles[0::2]

odd = tiles[1::2]



even0 = even.count(0)

even1 = even.count(1)

odd0 = odd.count(0)

odd1 = odd.count(1)



if even0 >= max(even1, odd0, odd1) or odd1 >= max(even0, even1, odd0):

    print((even1 + odd0))



elif even1 >= max(even0, odd0, odd1) or odd0 >= max(even0, even1, odd1):

    print((even0 + odd1))
tiles = list(map(int, eval(input())))
even = tiles[0::2]
odd = tiles[1::2]
if even.count(0) >= even.count(1):
    ans1 = even.count(1) + odd.count(0)
else:
    ans1 = even.count(0) + odd.count(1)
if odd.count(0) >= odd.count(1):
    ans2 = odd.count(1) + even.count(0)
else:
    ans2 = odd.count(0) + even.count(1)
print((min(ans1, ans2)))

tiles = list(map(int, eval(input())))
even = tiles[0::2]
odd = tiles[1::2]
even0 = even.count(0)
even1 = even.count(1)
odd0 = odd.count(0)
odd1 = odd.count(1)
if even0 >= max(even1, odd0, odd1) or odd1 >= max(even0, even1, odd0):
    print((even1 + odd0))
elif even1 >= max(even0, odd0, odd1) or odd0 >= max(even0, even1, odd1):
    print((even0 + odd1))

-if even.count(0) >= even.count(1): -    ans1 = even.count(1) + odd.count(0) -else: -    ans1 = even.count(0) + odd.count(1) -if odd.count(0) >= odd.count(1): -    ans2 = odd.count(1) + even.count(0) -else: -    ans2 = odd.count(0) + even.count(1) -print((min(ans1, ans2))) +even0 = even.count(0) +even1 = even.count(1) +odd0 = odd.count(0) +odd1 = odd.count(1) +if even0 >= max(even1, odd0, odd1) or odd1 >= max(even0, even1, odd0): +    print((even1 + odd0)) +elif even1 >= max(even0, odd0, odd1) or odd0 >= max(even0, even1, odd1): +    print((even0 + odd1))