S = eval(input())

len_S = len(S)

cnt1 = 0



if len_S%2 == 0:

  ans = "01"*(len_S//2)

else:

  ans = "01"*(len_S//2)+"0"

for i in range(len_S):

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

    cnt1 += 1

final_ans = min(len_S-cnt1,cnt1)

print(final_ans)
s = eval(input())

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

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

print((min(a, b)))

S = eval(input())
len_S = len(S)
cnt1 = 0
if len_S % 2 == 0:
    ans = "01" * (len_S // 2)
else:
    ans = "01" * (len_S // 2) + "0"
for i in range(len_S):
    if S[i] != ans[i]:
        cnt1 += 1
final_ans = min(len_S - cnt1, cnt1)
print(final_ans)

s = eval(input())
a = s[::2].count("0") + s[1::2].count("1")
b = s[::2].count("1") + s[1::2].count("0")
print((min(a, b)))

-S = eval(input()) -len_S = len(S) -cnt1 = 0 -if len_S % 2 == 0: -    ans = "01" * (len_S // 2) -else: -    ans = "01" * (len_S // 2) + "0" -for i in range(len_S): -    if S[i] != ans[i]: -        cnt1 += 1 -final_ans = min(len_S - cnt1, cnt1) -print(final_ans) +s = eval(input()) +a = s[::2].count("0") + s[1::2].count("1") +b = s[::2].count("1") + s[1::2].count("0") +print((min(a, b)))