S = list(eval(input()))



c = 0

if S[0] == '0':

    for i in S[::2]:

        if i == '1':

            c += 1

    for j in S[1::2]:

        if j == '0':

            c += 1

        

d = 0

if S[0] == '1':

    for i in S[::2]:

        if i == '0':

            d += 1

    for j in S[1::2]:

        if j == '1':

            d += 1

            

print((max(c,d)))
S = list(eval(input()))



s = S[::2].count('1') + S[1::2].count('0')

u = S[::2].count('0') + S[1::2].count('1')



print((min(s, u)))
S = list(eval(input()))
c = 0
if S[0] == "0":
    for i in S[::2]:
        if i == "1":
            c += 1
    for j in S[1::2]:
        if j == "0":
            c += 1
d = 0
if S[0] == "1":
    for i in S[::2]:
        if i == "0":
            d += 1
    for j in S[1::2]:
        if j == "1":
            d += 1
print((max(c, d)))

S = list(eval(input()))
s = S[::2].count("1") + S[1::2].count("0")
u = S[::2].count("0") + S[1::2].count("1")
print((min(s, u)))

-c = 0 -if S[0] == "0": -    for i in S[::2]: -        if i == "1": -            c += 1 -    for j in S[1::2]: -        if j == "0": -            c += 1 -d = 0 -if S[0] == "1": -    for i in S[::2]: -        if i == "0": -            d += 1 -    for j in S[1::2]: -        if j == "1": -            d += 1 -print((max(c, d))) +s = S[::2].count("1") + S[1::2].count("0") +u = S[::2].count("0") + S[1::2].count("1") +print((min(s, u)))