S = str(eval(input()))

check1 = 0

for i in range(len(S)):

    if i % 2 == 0 and S[i] != "0":

#         print(i,'yes')

        check1 += 1

    if i % 2 != 0 and S[i] == "0":

#         print(i,"no")

        check1 += 1

# print(check1)



check2 = 0

for i in range(len(S)):

    if i % 2 == 0 and S[i] != "1":

#         print(i,'yes')

        check2 += 1

    if i % 2 != 0 and S[i] == "1":

#         print(i,"no")

        check2 += 1

# print(check2)



print((min(check1,check2)))
s = eval(input())



ans1 = 0

ans2 = 0

for i,j in enumerate(s):

    if i % 2 == 0 and j == '0':

        ans1 += 1

    if i % 2 == 1 and j == '1':

        ans1 += 1

    if i % 2 == 0 and j == '1':

        ans2 += 1

    if i % 2 == 1 and j == '0':

        ans2 += 1

print((min(ans1, ans2)))
S = str(eval(input()))
check1 = 0
for i in range(len(S)):
    if i % 2 == 0 and S[i] != "0":
        #         print(i,'yes')
        check1 += 1
    if i % 2 != 0 and S[i] == "0":
        #         print(i,"no")
        check1 += 1
# print(check1)
check2 = 0
for i in range(len(S)):
    if i % 2 == 0 and S[i] != "1":
        #         print(i,'yes')
        check2 += 1
    if i % 2 != 0 and S[i] == "1":
        #         print(i,"no")
        check2 += 1
# print(check2)
print((min(check1, check2)))

s = eval(input())
ans1 = 0
ans2 = 0
for i, j in enumerate(s):
    if i % 2 == 0 and j == "0":
        ans1 += 1
    if i % 2 == 1 and j == "1":
        ans1 += 1
    if i % 2 == 0 and j == "1":
        ans2 += 1
    if i % 2 == 1 and j == "0":
        ans2 += 1
print((min(ans1, ans2)))

-S = str(eval(input())) -check1 = 0 -for i in range(len(S)): -    if i % 2 == 0 and S[i] != "0": -        #         print(i,'yes') -        check1 += 1 -    if i % 2 != 0 and S[i] == "0": -        #         print(i,"no") -        check1 += 1 -# print(check1) -check2 = 0 -for i in range(len(S)): -    if i % 2 == 0 and S[i] != "1": -        #         print(i,'yes') -        check2 += 1 -    if i % 2 != 0 and S[i] == "1": -        #         print(i,"no") -        check2 += 1 -# print(check2) -print((min(check1, check2))) +s = eval(input()) +ans1 = 0 +ans2 = 0 +for i, j in enumerate(s): +    if i % 2 == 0 and j == "0": +        ans1 += 1 +    if i % 2 == 1 and j == "1": +        ans1 += 1 +    if i % 2 == 0 and j == "1": +        ans2 += 1 +    if i % 2 == 1 and j == "0": +        ans2 += 1 +print((min(ans1, ans2)))