s = eval(input())

s1 = '01' * (10 ** 5 // 2)

s1 = s1[:len(s)]

count = [0, 0]



for i in range(len(s)):

    if s[i] != s1[i]:

        count[0] += 1

    else:

        count[1] += 1



print((min(count)))

S = eval(input())

s = ''

s2 = ''

for i in range(len(S)):

    s += str(i % 2)

    s2 += str((i+1) % 2)

c = 0

c2 = 0

for i in range(len(S)):

    if S[i] != s[i]:

        c += 1

    if S[i] != s2[i]:

        c2 += 1

print((min(c, c2)))

s = eval(input())
s1 = "01" * (10**5 // 2)
s1 = s1[: len(s)]
count = [0, 0]
for i in range(len(s)):
    if s[i] != s1[i]:
        count[0] += 1
    else:
        count[1] += 1
print((min(count)))

S = eval(input())
s = ""
s2 = ""
for i in range(len(S)):
    s += str(i % 2)
    s2 += str((i + 1) % 2)
c = 0
c2 = 0
for i in range(len(S)):
    if S[i] != s[i]:
        c += 1
    if S[i] != s2[i]:
        c2 += 1
print((min(c, c2)))

-s = eval(input()) -s1 = "01" * (10**5 // 2) -s1 = s1[: len(s)] -count = [0, 0] -for i in range(len(s)): -    if s[i] != s1[i]: -        count[0] += 1 -    else: -        count[1] += 1 -print((min(count))) +S = eval(input()) +s = "" +s2 = "" +for i in range(len(S)): +    s += str(i % 2) +    s2 += str((i + 1) % 2) +c = 0 +c2 = 0 +for i in range(len(S)): +    if S[i] != s[i]: +        c += 1 +    if S[i] != s2[i]: +        c2 += 1 +print((min(c, c2)))