S = eval(input())

A = []

ans = 0

for i in range(len(S)):

    if i % 2 == 0:

        A.append(1)

    else:

        A.append(0)

for i in range(len(S)):

    if int(S[i]) != int(A[i]):

        ans += 1

print((min(ans, len(S) - ans)))
s = list(eval(input()))

count1 = 0

count2 = 0



if s[0] == '0':

    for i in range(len(s)):

        if i % 2 == 0:

            if s[i] == '0':

                continue

            else:

                count1 +=1

        else:

            if s[i] == '1':

                continue

            else:

                count1 += 1

            

else:

    for i in range(len(s)):

        if i % 2 == 0:

            if s[i] == '1':

                continue

            else:

                count2 += 1

        else:

            if s[i] == '0':

                continue

            else:

                count2 += 1

            

print((max(count1,count2)))

        
S = eval(input())
A = []
ans = 0
for i in range(len(S)):
    if i % 2 == 0:
        A.append(1)
    else:
        A.append(0)
for i in range(len(S)):
    if int(S[i]) != int(A[i]):
        ans += 1
print((min(ans, len(S) - ans)))

s = list(eval(input()))
count1 = 0
count2 = 0
if s[0] == "0":
    for i in range(len(s)):
        if i % 2 == 0:
            if s[i] == "0":
                continue
            else:
                count1 += 1
        else:
            if s[i] == "1":
                continue
            else:
                count1 += 1
else:
    for i in range(len(s)):
        if i % 2 == 0:
            if s[i] == "1":
                continue
            else:
                count2 += 1
        else:
            if s[i] == "0":
                continue
            else:
                count2 += 1
print((max(count1, count2)))

-S = eval(input()) -A = [] -ans = 0 -for i in range(len(S)): -    if i % 2 == 0: -        A.append(1) -    else: -        A.append(0) -for i in range(len(S)): -    if int(S[i]) != int(A[i]): -        ans += 1 -print((min(ans, len(S) - ans))) +s = list(eval(input())) +count1 = 0 +count2 = 0 +if s[0] == "0": +    for i in range(len(s)): +        if i % 2 == 0: +            if s[i] == "0": +                continue +            else: +                count1 += 1 +        else: +            if s[i] == "1": +                continue +            else: +                count1 += 1 +else: +    for i in range(len(s)): +        if i % 2 == 0: +            if s[i] == "1": +                continue +            else: +                count2 += 1 +        else: +            if s[i] == "0": +                continue +            else: +                count2 += 1 +print((max(count1, count2)))